//
//  VankeSettlementListAPI.h
//  vanke
//  查询对账单列表
//  Created by xiaomi on 15/10/8.
//  Copyright © 2015年 gomore. All rights reserved.
//

#import "Bee.h"
#import "VankeBaseAPI.h"
#import "VankeResponse.h"

@class Paging;
@class SubjectItem;
@class StatementSummary;
@class StatementListResponse;


/*
 * 查询对账单列表
 * http://.../wanke-server/rest/project/queryprojectsby?classificationEquals={classificationEquals}&nameLike={nameLike}&salesDateEquals={salesDateEquals}& passengerDateEquals={passengerDateEquals}&trafficDateEquals={trafficDateEquals}
 */
@interface VankeSettlementListAPI : VankeBaseAPI

// 账期等于
@property (nonatomic, strong) NSDate *settleEquals;

// 是否已确认
@property (nonatomic, assign) BOOL confirmed;

// 项目列表
@property (nonatomic, strong) NSArray *projectsIn;

// 商铺名称或代码类似于
@property (nonatomic, strong) NSString *shopNameOrCodeLike;

@end

// 分页信息
@interface Paging : BeeActiveObject

@property (nonatomic, strong) NSNumber *page;
@property (nonatomic, strong) NSNumber *pageSize;
@property (nonatomic, strong) NSNumber *pageCount;
@property (nonatomic, strong) NSNumber *recordCount;

@end

// 对账单科目
@interface SubjectItem : BeeActiveObject

@property (nonatomic, strong) NSString *subject;
@property (nonatomic, strong) NSString *beginDate;
@property (nonatomic, strong) NSString *endDate;
@property (nonatomic, strong) NSNumber *direction;
@property (nonatomic, strong) NSNumber *amount;
@property (nonatomic, strong) NSString *remark;

@end

// 对账单合计
@interface StatementShop : BeeActiveObject

@property (nonatomic, strong) NSString *contract;
@property (nonatomic, strong) NSString *shopCode;
@property (nonatomic, strong) NSString *shopName;
@property (nonatomic, strong) NSString *picture;
@property (nonatomic, strong) NSDate *settle;
@property (nonatomic, strong) NSNumber *amount;
@property (nonatomic, strong) NSString *state;
@property (nonatomic, strong) NSArray *items; // SubjectItem

-(NSString*) getPictureUrlOrDefault;
-(NSString*) codeName;

@end

// 对账单返回
@interface StatementListResponse : VankeResponse

@property (nonatomic, strong) NSDate *settle;
@property (nonatomic, strong) NSNumber *amount;
@property (nonatomic, strong) Paging *paging;
@property (nonatomic, strong) NSArray *records; // StatementSummary

-(BOOL) hasMore;

+(instancetype) fakeData;

@end