//
//  JavenOrderModel.h
//
//  Created by Z  on 16/5/9
//  Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JavenGoodsDetails.h"
#import "JavenReseller.h"
#import "JavenLastModifyInfo.h"
#import "JavenTicket.h"
#import "JavenShop.h"
#import "JavenCreateInfo.h"
#import "JavenConsumer.h"
#import "JavenAddress.h"

@class JavenReseller, JavenLastModifyInfo, JavenTicket, JavenShop, JavenCreateInfo, JavenConsumer, JavenAddress;

typedef NS_ENUM(NSInteger, ORDERTOPTYPE)
{
    ORDERTOPTYPE_NOPAYMENT,//代支付
    ORDERTOPTYPE_WAITFORDISPATCH,//待发货
    ORDERTOPTYPE_TRANSPORTED,//已发货
    ORDERTOPTYPE_COMMPLETE,//已完成
    ORDERTOPTYPE_CANCELED//已取消
};


@interface JavenOrderModel : NSObject <NSCoding, NSCopying>

@property (nonatomic, strong) NSArray<JavenGoodsDetails *> *goodsDetails;
@property (nonatomic, strong) NSString *shipTrackingNumber;
@property (nonatomic, assign) double total;
@property (nonatomic, assign) double tax;
@property (nonatomic, assign) double commissions;
@property (nonatomic, strong) JavenReseller *reseller;
@property (nonatomic, strong) id shipType;
@property (nonatomic, strong) NSString *billNumber;
@property (nonatomic, strong) id billNumberEx;
@property (nonatomic, assign) double goodsCount;
@property (nonatomic, assign) double discount;
@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) id payMethod;
@property (nonatomic, strong) JavenLastModifyInfo *lastModifyInfo;
@property (nonatomic, strong) JavenTicket *ticket;
@property (nonatomic, assign) double version;
@property (nonatomic, strong) NSString *state;
@property (nonatomic, strong) NSString *domain;
@property (nonatomic, strong) NSString *ownerBillNumber;
@property (nonatomic, assign) double freight;
@property (nonatomic, strong) JavenShop *shop;
@property (nonatomic, strong) JavenCreateInfo *createInfo;
@property (nonatomic, strong) JavenConsumer *consumer;
@property (nonatomic, assign) double goodsAmount;
@property (nonatomic, strong) id remark;
@property (nonatomic, strong) JavenAddress *address;
@property (nonatomic, strong) id shkjtNo;

+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
- (NSString *)getState;
@end
