/*
 * Copyright (c) 2018-2999 楠炲灝绐炴禍姘辫儗娣団剝浼呯粔鎴炲Η閺堝愭洪崗顒寰 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 閺堫亞绮￠崗浣筋啅閿涘奔绗夐崣顖氫粵閸熷棔绗熼悽銊┾偓鏃撶磼
 *
 * 閻楀牊娼堥幍鈧閺堝涚礉娓氬灚娼堣箛鍛鈹掗敍?
 */

package com.yami.shop.bean.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@TableName("tz_order")
public class Order implements Serializable {
    private static final long serialVersionUID = 6222259729062826852L;
    /**
     * 鐠併垹宕烮D
     */
    @TableId
    private Long orderId;

    /**
     * 鎼存呮懙id
     */
    private Long shopId;
    @TableField(exist = false)
    private String shopName;
    /**
     * 濞撶娀浜綢D
     */
    private Long channelId;
    @TableField(exist = false)
    private String channelName;

    /**
     * 娴溠冩惂閸氬秶袨,婢舵矮閲滄禍褍鎼х亸鍡曠窗娴犮儵鈧妤褰块梾鏂跨磻
     */
    private String prodName;

    /**
     * 鐠併垼鍠橀悽銊﹀煕ID
     */
    private String userId;
    /**
     * 閻栨儼顓归崡鏇犵椽閸?
     */
    private String parentOrderNumber;

    /**
     * 鐠併垼鍠樺ù浣规寜閸?
     */
    private String orderNumber;

    /**
     * 閹璇测偓?
     */
    private Double total;

    /**
     * 鐎圭偤妾閹璇测偓?
     */
    private Double actualTotal;

    /**
     * 閺顖欑帛閺傜懓绱 1 瀵邦喕淇婇弨顖欑帛 2 閺顖欑帛鐎?
     */
    private Integer payType;

    /**
     * 閻銊﹀煕婢跺洦鏁
     */
    private String remarks;

    /**
     * 閸楁牕顔嶆径鍥ㄦ暈
     */
    private String shopRemarks;


    /**
     * 濞村嘲宕ョ拋銏犲礋閻樿埖鈧?
     * 0-瀵板懏鏁娴?20-鐠併垹宕熷稿弶甯撮崡?瀵板懏瀚炵拹?,30-鐠併垹宕熷板懘鍘ら柅渚婄礄閹凤綀鎻ｇ瑰本鍨/閼奉亝褰佺猾鏄忣吂閸楁洑璐熷板懓鍤滈幓鎰剁礆,40-鐠併垹宕熼柊宥夆偓浣疯厬 ,50-鐠併垹宕熼崣鏍ㄧХ瀵板懎顓搁弽?60-鐠併垹宕熷告彃褰囧☉?70-鐠併垹宕熷告煡鈧浣芥彧,80-鐠併垹宕熷告彃鐣閹?
     */
    private Integer hbOrderStatus;

    /**
     * 濞村嘲宕ラ悧鈺傜ウ閻樿埖鈧?
     * 20:瀹稿弶濮犻崡鏇绱30:闁板秹鈧浣告喅閸掓澘绨甸敍?0:閸欐牞鎻ｇ瑰本鍨氶敍?0:闁板秹鈧浣稿礋閸欐牗绉,100:瀹告煡鈧浣芥彧
     */
    private Integer hbLogisticStatus;

    /**
     * 闁板秹鈧浣鸿閸ㄥ剁礄1:韫囶偊鈧?2:閼奉亝褰 3閿涙艾寮烽弮鍫曞帳闁?10-閸熷棗顔嶆潪顒冨殰闁渚婄礆
     */
    private Integer dvyType;

    /**
     * 闁板秹鈧浣规煙瀵寤擠
     */
    private Long dvyId;

    /**
     * 閻椻晜绁﹂崡鏇炲娇
     */
    private String dvyFlowId;

    /**
     * 鐠併垹宕熸潻鎰鍨
     */
    private Double freightAmount;

    /**
     * 閻銊﹀煕鐠併垹宕熼崷鏉挎絻Id
     */
    private Long addrOrderId;

    /**
     * 閺勵垰鎯佹稉楦跨Т闁插秷顓归崡鏇绱0-閺堫亣绉撮柌宥忕礉1-鐡掑懘鍣 閿?
     */
    private Integer orderSplitStatus;
    /**
     * 鐎涙劘顓归崡鏇熸殶闁插繐鎳￠崥?
     */
    private Integer orderSplitNumber;
    /**
     * 閺勵垰鎯侀懛顏勫З閹峰棗宕(0-閹靛濮╅幏鍡楀礋閿?-閼奉亜濮╅幏鍡楀礋)
     */
    private Integer autoSplit;
    /**
     * 閺勵垰鎯侀棁鈧鐟曚焦濯堕崡鏇绱0-閹峰棗宕熸稉瀛樻傛穱婵嗙摠閿?-娑撳秵濯堕崡鏇绱2-瀵板懏濯堕崡鏇绱3-閹峰棗宕熸稉顓ㄧ礉4-瀹稿弶濯堕崡鏇绱
     */
    private Integer splitStatus;
    /**
     * 鐠併垹宕熺粵澶岄獓閿?-閻栨儼顓归崡鏇绱1-鐎涙劘顓归崡鏇绱
     */
    private Integer orderLevel;
    /**
     * 閹峰棗宕熼幙宥勭稊娴滅瘨D
     */
    private Long splitUserId;

    private String consigneeName;

    private String consigneeMobile;

    private String consigneeAddress;

    private Double latitude;

    private Double longitude;

    @TableField(exist = false)
    @ApiModelProperty("Split user name")
    private String splitUserName;


    /**
     * 鐠併垹宕熼崯鍡楁惂閹缁樻殶
     */
    private Integer productNums;
    @ApiModelProperty("閻楃數澧伴懞杈顓归崡鏄砫")
    private  String qnhOrderId;

    @ApiModelProperty("QNH order status")
    private  String qnhOrderStatus;

    /**
     * 鐠併垼鍠橀弮鍫曟？
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 鐠併垹宕熼弴瀛樻煀閺冨爼妫
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 娴犳ɑ顑欓弮鍫曟？
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /**
     * 閸欐垼鎻ｉ弮鍫曟？
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dvyTime;

    /**
     * 鐎瑰本鍨氶弮鍫曟？
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date finallyTime;


    /**
     * 鐠併垹宕熼崣鏍ㄧХ閸樼喎娲
     */
    private String cancelReason;

    /**
     * 閸欐牗绉烽弮鍫曟？
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date cancelTime;

    /**
     * 閺勵垰鎯佸歌尙绮￠弨顖欑帛閿?閿涙艾鍑＄紒蹇旀暜娴犳跨箖閿?閿涙熬绱濆▽鈩冩箒閺顖欑帛鏉?
     */
    private Integer isPayed;

    /**
     * 閻銊﹀煕鐠併垹宕熼崚鐘绘珟閻樿埖鈧渚婄礉0閿涙碍鐥呴張澶婂灩闂勩倧绱 1閿涙艾娲栭弨鍓佺彲閿?2閿涙碍妗堟稊鍛鍨归梽?
     */
    private Integer deleteStatus;

    /**
     * 鐠併垹宕熼柅鈧濞嗗墽濮搁幀渚婄礄1:閻㈠疇顕闁鈧濞?2:闁鈧濞嗙偓鍨氶崝?3:闁銊ュ瀻闁鈧濞嗙偓鍨氶崝?4:闁鈧濞嗘儳銇戠拹銉绱
     */
    private Integer refundStatus;

    /**
     * 楠炲啿褰存导妯诲劕閹濠氼杺
     */
    private Double platformAmount;

    /**
     * 娴兼ɑ鍎閹濠氼杺
     */
    private Double reduceAmount;

    /**
     * 浼氬憳浼樻儬閲戦
     */
    private Double memberDiscountAmount;

    /**
     * 浼氬憳浼樻儬璇存槑
     */
    private String memberDiscountDesc;

    /**
     * 鐠併垹宕熺猾璇茬烽崣鍌濃偓鍍秗derType ,1閸ャ垼鍠樼拋銏犲礋 2缁夋帗娼冪拋銏犲礋,3缁夘垰鍨庣拋銏犲礋
     */
    private Integer orderType;

    /**
     * 鐠併垹宕熼崗鎶芥４閸樼喎娲 (1:鐡掑懏妞傞張顏呮暜娴?2:闁鈧濞嗘儳鍙ч梻?4:娑旀澘顔嶉崣鏍ㄧХ 15:瀹告煡鈧姘崇箖鐠愌冨煂娴犳ɑ顑欐禍銈嗘)
     */
    private Integer closeType;

    @ApiModelProperty("Delivery status")
    private Integer dvyStatus;


    /**
     * 娑旀澘顔嶉弰鐢敌
     */
    @TableField(exist = false)
    @ApiModelProperty("Nickname")
    private String nickName;
    /**
     * 娑旀澘顔嶉幍瀣婧閸?
     */
    @TableField(exist = false)
    @ApiModelProperty("User mobile")
    private String userMobile;

    @TableField(exist = false)
    @ApiModelProperty("Receiver")
    private String receiver;

    @TableField(exist = false)
    private List<OrderItem> orderItems;

    /**
     * 閻銊﹀煕鐠併垹宕熼崷鏉挎絻
     */
    @TableField(exist = false)
    private UserAddrOrder userAddrOrder;

    /**
     * 闁鈧濞嗘崘顓归崡鏇犵椽閸?
     */
    @TableField(exist = false)
    private String refundSn;

    /**
     * 鐠併垹宕熼幍鈧閻銊袧閸?
     */
    @TableField(exist = false)
    private Integer score;
    /**
     * 鐠囧嫯顔戦悩鑸碘偓渚婄窗 0 閺堫亣鐦庢禒? 1 瀹歌尪鐦庢禒?
     */
    private Integer commSts;
    /**
     * 闁鈧濞嗗墽濮搁幀?
     */
    @TableField(exist = false)
    private Integer returnMoneySts;

    /**
     * 闁鈧濞嗗墽琚閸?
     */
    @TableField(exist = false)
    private Integer refundType;

    /**
     * 娴滃繑宕闁叉垿顤
     */
    @TableField(exist = false)
    private Double lossAmount;

    @TableField(exist = false)
    private Integer payScore;

    /**
     * 閺勵垰鎯侀棁鈧鐟曚焦鏁娴?
     */
    @TableField(exist = false)
    private Boolean nextPay = Boolean.FALSE;

    @TableField
    private Long offsetPoints;

    @TableField(exist = false)
    private Integer goodsTotalCount;


    /**
     * 鐎涙劘顓归崡鏇氫繆閹?
     */
    @TableField(exist = false)
    private List<Order> subOrders;

    /**
     * 自提核验码（明文码），长度不超过50
     */
    private String selfPickCode;


}
