package com.fs.hisStore.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import lombok.Data;

/**
 * 订单对象 fs_store_order
 *
 * @author fs
 * @date 2022-03-15
 */
@Data
public class FsStoreOrderScrm extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    private Long id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderCode;

    /** 额外订单号 */
    private String extendOrderId;

    private String payOrderId;

    private String bankOrderId;

    /** 用户id */
    private Long userId;

    /** 用户姓名 */
    @Excel(name = "收货人")
    private String realName;

    /** 用户电话 */
    @Excel(name = "手机号")
    private String userPhone;

    /** 详细地址 */
    @Excel(name = "详细地址")
    private String userAddress;

    /** 购物车id */
    private String cartId;

    /** 运费金额 */
    private BigDecimal freightPrice;

    /** 订单商品总数 */
    @Excel(name = "订单商品总数")
    private Long totalNum;

    /** 订单总价 */
    @Excel(name = "订单总价")
    private BigDecimal totalPrice;

    /** 邮费 */
    private BigDecimal totalPostage;

    /** 实际支付金额 */
    @Excel(name = "应付金额")
    private BigDecimal payPrice;

    /** 支付邮费 */
    private BigDecimal payPostage;

    @Excel(name = "物流代收金额")
    private BigDecimal payDelivery;

    @Excel(name = "支付金额")
    private BigDecimal payMoney;

    /** 抵扣金额 */
    private BigDecimal deductionPrice;

    /** 优惠券id */
    private Long couponId;

    /** 优惠券金额 */
    private BigDecimal couponPrice;

    /** 支付状态 */
    @Excel(name = "支付状态 1已支付 0未支付 2支付中")
    private Integer paid;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /** 支付方式 */
    @Excel(name = "支付方式 1线上 2物流代收")
    private String payType;

    private Integer status;

    /** 0 未退款 1 申请中 2 已退款 */
    private Integer refundStatus;

    /** 退款图片 */
    @Excel(name = "退款图片")
    private String refundReasonWapImg;

    /** 退款用户说明 */
    @Excel(name = "退款用户说明")
    private String refundReasonWapExplain;

    /** 退款时间 */

    private Date refundReasonTime;

    /** 前台退款原因 */
    private String refundReasonWap;

    /** 不退款的理由 */
    private String refundReason;

    /** 退款金额 */
    private BigDecimal refundPrice;

    /** 快递公司编号 */
    @Excel(name = "快递公司编号")
    private String deliverySn;

    /** 快递名称/送货人姓名 */
    @Excel(name = "快递名称")
    private String deliveryName;

    /** 发货类型 */
    private String deliveryType;

    /** 快递单号/手机号 */
    @Excel(name = "快递单号")
    private String deliveryId;

    /** 消费赚取积分 */
    private BigDecimal gainIntegral;

    /** 使用积分 */
    @Excel(name = "使用积分")
    private BigDecimal useIntegral;

    /** 实际支付积分 */
    @Excel(name = "实际支付积分")
    private BigDecimal payIntegral;

    /** 给用户退了多少积分 */
    private BigDecimal backIntegral;

    /** 备注 */
    @Excel(name = "备注")
    private String mark;


    /** 是否删除 */
    private Integer isDel;

    /** 成本价 */
    private BigDecimal cost;

    /** 核销码 */
    private String verifyCode;

    /** 门店id */
    private Long storeId;

    /** 配送方式 1=快递 ，2=门店自提 */
    private Integer shippingType;

    /** 支付渠道(0微信公众号1微信小程序) */
    private Integer isChannel;

    /** 是否提醒 */
    private Integer isRemind;

    /** 是否系统删除 */
    private Integer isSysDel;

    private Integer isPrescribe;

    private Long prescribeId;

    private Long companyId;

    private Long companyUserId;

    private Integer isPackage;

    private String packageJson;

    private String itemJson;

    private Integer orderType;

    private Long packageId;

    private Integer orderCreateType;

    private String storeHouseCode;



    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date finishTime;

    private Integer deliveryStatus;

    private Integer deliveryPayStatus;

    @Excel(name = "快递帐单日期")
    private String deliveryTime;

    @Excel(name = "快递结算日期")
    private String deliveryPayTime;

    private BigDecimal deliveryPayMoney;

    private BigDecimal tuiMoney;

    private Integer tuiMoneyStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "回单导入时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryImportTime;

    private Long tuiUserId;

    private Integer tuiUserMoneyStatus;

    private Long deptId;

    private Integer isEditMoney;

    private Long customerId;

    private Integer isPayRemain;


    @Excel(name = "剩余金额")
    @TableField(exist = false)
    private BigDecimal payRemain;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date deliverySendTime;

    //凭证
    private String certificates;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date uploadTime;

    private Long scheduleId; //归属档期id

    private String orderVisit; //订单跟随阶段

    private BigDecimal serviceFee;

    private Integer orderMedium; //媒体来源


    @Excel(name = "医生ID")
    private Long doctorId;

    /** 支付状态 待支付 1已支付 */
    @Excel(name = "支付状态 待支付 1已支付")
    private Integer isPay;

    /** 退款图片 */
    @Excel(name = "退款图片")
    private String refundImg;

    /** 退款用户说明 */
    @Excel(name = "退款用户说明")
    private String refundExplain;

    /** 退款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "退款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundTime;

    /** 退款金额 */
    @Excel(name = "退款金额")
    private BigDecimal refundMoney;

    /** 快递公司编号 */
    @Excel(name = "快递公司编号")
    private String deliveryCode;

    /** 成本价 */
    @Excel(name = "成本价")
    private BigDecimal costPrice;

    private BigDecimal discountMoney;

    private Long userCouponId;

    private Long inquiryOrderId;

    private Long packageOrderId;

    private String remark;

    private Integer isAfterSales;

    private BigDecimal prescribePrice;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date followTime;

    private Long followDoctorId;
    private Integer cycle;
    private Integer followNum;


    private Long orderBuyType;//购买类型，同药品商城的订单订单类型
    private String channel;//公众号/渠道

    private String orderChannel;//订单渠道

    private String qwSubject;

    private String packageName;

    private String packageSecondName;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date followEndTime;

    private Integer followStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryUpdateTime;

    private Integer isFirst;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date tuiMoneyTime;

    private Integer source;
    private BigDecimal billPrice;
    private String erpPhone;

    @TableField(exist = false)
    private String bankTransactionId;
}
