package com.fs.his.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import io.swagger.models.auth.In;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 订单对象 fs_store_order
 *
 * @author fs
 * @date 2023-06-13
 */
@Data
public class FsStoreOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

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

    private Long storeId;

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

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


    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 收货人 */
    @Excel(name = "收货人")
    private String userName;

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

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

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

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

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

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

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

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

    /** 支付时间 */
    @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 = "支付方式 1微信")
    private Integer payType;

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

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

    /** 退款图片 */
    @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 String refundReason;

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

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

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

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

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

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

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

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

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

    /** 是否开处方 */
    @Excel(name = "是否开处方")
    private Integer isPrescribe;

    /** 处方ID */
    @Excel(name = "处方ID")
    private Long prescribeId;

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

    /** 发货时间 */
    @Excel(name = "发货时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String deliveryTime;

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

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

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

    /** 订单创建类型 */
    @Excel(name = "订单创建类型")
    private Long orderCreateType;

    @Excel(name = "订单类型")
    private Integer orderType;

    private String itemJson;

    private BigDecimal discountMoney;

    private Long userCouponId;

    private Long companyId;

    private Long companyUserId;

    @Excel(name = "仓库编号")
    private String storeHouseCode;

    private String extendOrderId;
    private BigDecimal payDelivery;

    private Long packageId;

    private Long inquiryOrderId;

    private Long packageOrderId;
    @Excel(name = "剩余金额")
    private BigDecimal payRemain;

    private Integer deliveryStatus;
    private Integer deliveryPayStatus;
    private String deliveryPayTime;
    private String deliveryType;
    private BigDecimal deliveryPayMoney;

    private String remark;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryImportTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deliverySendTime;

    private Integer isAfterSales;

    private BigDecimal prescribePrice;

    private Long deptId;

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

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

    private Long scheduleId;//档期id

    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 Long customerId;
    private Integer source;
    private BigDecimal billPrice;

}
