package com.fs.live.domain;

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

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;

/**
 * 订单对象 live_order
 *
 * @author fs
 * @date 2025-07-08
 */
@Data
public class LiveOrder extends BaseEntity {

    /** 订单ID */
    private Long orderId;
    /** 订单号 */
    @Excel(name = "订单号")
    private String orderCode;
    /** 会员ID */
    @Excel(name = "会员ID")
    private String userId;

    /** 管易云订单号 */
    @Excel(name = "管易云订单号")
    private String extendOrderId;

    @Excel(name = "所属公司")
    private String companyName;
    @Excel(name = "所属销售")
    private String companyUserName;

    @Excel(name = "推线编号")
    private String registerCode;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "客户创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date customerCreateTime;
    @Excel(name = "客户来源",dictType = "crm_customer_source")
    private Long source;
    @Excel(name = "成单类型", dictType = "store_order_type")
    private String orderType;

    @Excel(name = "套餐包分类", dictType = "store_product_package_cate")
    private String cateId;
    /** 收货人 */
    @Excel(name = "收货人姓名")
    private String userName;

    /** 收货人电话 */
    @Excel(name = "收货人电话")
    private String userPhone;


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

    /** $column.columnComment */
//    @Excel(name = "店铺ID")
    private Long storeId;

    private Long productId;


    /** 订单总价 */
    @Excel(name = "商品金额",cellType= Excel.ColumnType.NUMERIC)
    private BigDecimal totalPrice;

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

    @Excel(name = "实付金额",cellType= Excel.ColumnType.NUMERIC)
    private BigDecimal payMoney;

    @Excel(name = "物流代收金额",cellType= Excel.ColumnType.NUMERIC)
    private BigDecimal payDelivery;

    @Excel(name = "支付邮费", cellType= Excel.ColumnType.NUMERIC)
    private BigDecimal payPostage;

    /** 抵扣金额 */
    @Excel(name = "抵扣金额",cellType= Excel.ColumnType.NUMERIC)
    private BigDecimal deductionPrice;

    /** 优惠券金额 */
    @Excel(name = "优惠券金额",cellType= Excel.ColumnType.NUMERIC)
    private BigDecimal discountMoney;

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

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

    /** 支付方式 1微信 */
    @Excel(name = "支付方式", readConverterExp = "微信=1")
    private String payType;

    /** 订单状态（-1 : 申请退款 -2 : 退货成功 0：已取消 1：待支付 2：待发货；3：待收货；4：待评价；5：已完成） */
    @Excel(name = "订单状态", dictType = "sys_order_status")
    private Integer status;

    @Excel(name = "交易单号")
    private String bankTrxId;

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

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




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

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

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

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


    @Excel(name = "物流代收结算状态", dictType = "store_delivery_pay_status")
    private Integer deliveryPayStatus;

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

    /** $column.columnComment */
    @Excel(name = "快递结算日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private String deliveryPayTime;

    @Excel(name = "物流结算费用")
    private BigDecimal deliveryPayMoney;

    /** 物流跟踪状态 */
    @Excel(name = "物流跟踪状态", dictType = "store_order_delivery_type")
    private String deliveryType;

    /** 物流状态 */
    @Excel(name = "物流状态",dictType = "store_order_delivery_status")
    private Integer deliveryStatus;

    @Excel(name = "客户编码")
    private String customerCode;

    @Excel(name = "商品名称")
    private String productName;

    @Excel(name = "是否上传凭证 0：未上传 1：已上传")
    private Integer isUpload;

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

    @Excel(name = "归属档期")
    private String scheduleName;
    /** 直播ID */
    @Excel(name = "直播ID")
    private Long liveId;

    /** 购物车id */
//    @Excel(name = "购物车id")
    private String cartId;

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


    /** 支付状态 待支付 1已支付 */
//    @Excel(name = "支付状态",readConverterExp = "待支付=0,已支付=1")
    private String isPay;

    /** 取消理由*/
    @Excel(name = "取消理由")
    private String cancelReason;



    // 支付开始时间
    private String payStartTime;
    // 支付结束时间
    private String payEndTime;





    /** 0 未退款 1 申请中 2 已退款 */
//    @Excel(name = "退款状态",readConverterExp = "未退款=0,申请中=1,已退款=2")
    private String refundStatus;

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

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



    /** 不退款的理由 */
//    @Excel(name = "不退款的理由")
    private String refundReason;


    /** 是否删除 */
//    @Excel(name = "是否删除")
    private String isDel;

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

    /** 核销码 */
//    @Excel(name = "核销码")
    private String verifyCode;

    /** 配送方式 1=快递 ，2=门店自提 */
//    @Excel(name = "配送方式",readConverterExp = "快递=1,门店自提=2")
    private Integer shippingType;

    /** 支付渠道(1微信小程序) */
//    @Excel(name = "支付渠道(1微信小程序)")
    private String isChannel;

    /** $column.columnComment */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date finishTime;

    // 完成时间-开始
    private String finishTimeStart;
    // 完成时间-结束
    private String finishTimeEnd;


    /** 推广佣金 */
//    @Excel(name = "推广佣金")
    private BigDecimal tuiMoney;

    /** 推广佣金状态 1已发放 0待发放 */
//    @Excel(name = "推广佣金状态",readConverterExp = "已发放=1,待发放=0")
    private Integer tuiMoneyStatus;

    /** 上级推荐人ID */
//    @Excel(name = "上级推荐人ID")
    private Long tuiUserId;

    /** orderItem字符串 */
//    @Excel(name = "orderItem字符串")
    private String itemJson;

    /** 优惠金额 */
//    @Excel(name = "优惠金额")


    /** $column.columnComment */
//    @Excel(name = "优惠金额")
    private Long userCouponId;

    /** 公司id */
//    @Excel(name = "公司id")
    private Long companyId;


    /** 公司员工id */
//    @Excel(name = "公司员工id")
    private Long companyUserId;



    /** 仓库代码 */
    @Excel(name = "仓库代码")
    private String storeHouseCode;

    /** 剩余金额 */
//    @Excel(name = "剩余金额")
    private BigDecimal payRemain;


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

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

    /** 是否可售后 */
//    @Excel(name = "是否可售后")
    private Integer isAfterSales;

    /** 部门id */
//    @Excel(name = "部门id")
    private Long deptId;

    /** 渠道 */
//    @Excel(name = "渠道")
    private String channel;


    /** 开票金额 */
//    @Excel(name = "开票金额")
    private BigDecimal billPrice;

    /** 邮费 */
//    @Excel(name = "邮费")
    private BigDecimal totalPostage;


    /** 消费赚取积分 */
//    @Excel(name = "消费赚取积分")
    private BigDecimal gainIntegral;

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

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

    /** 给用户退了多少积分 */
//    @Excel(name = "给用户退了多少积分")
    private BigDecimal backIntegral;

    /** 是否改价 */
//    @Excel(name = "是否改价")
    private Integer isEditMoney;


    /** 更新时间*/
//    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;



    /** 备注*/
//    @Excel(name = "订单名称")
    private String orderName;

    /** 备注*/
//    @Excel(name = "订单名称")
    private String productIntroduce;

    /** 备注*/
//    @Excel(name = "订单key")
    private String orderKey;

    /** 城市Id*/
    private Long cityId;



    private Long customerId;
    private Long couponUserId;
    private Long recordId;


}
