package com.sqx.modules.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
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 java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@TableName(value = "tb_order")
public class TbOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)

    @ApiModelProperty("order_id")
    private Long orderId;


    @ApiModelProperty("优惠券id")
    @TableField(value = "coupon_id")
    private Long couponId;


    @ApiModelProperty("用户id")
    private Long userId;


    @ApiModelProperty("用户名")
    private String userName;


    @ApiModelProperty("手机号")
    private String phone;


    @ApiModelProperty("地址id")
    private Long addressId;


    @ApiModelProperty("地址信息")
    private String address;


    @ApiModelProperty("订单号")
    private String orderNumber;


    @ApiModelProperty("是否支付 0未支付 1已支付")
    private Integer isPay;


    @ApiModelProperty("下单时间")
    private String createTime;

    @ApiModelProperty("最后一次修改订单状态时间")
    private String updateTime;


    @ApiModelProperty("支付时间")
    private String payTime;


    @ApiModelProperty("支付方式  1微信支付  2余额支付  3支付宝支付")
    private Integer payType;


    @ApiModelProperty("取餐号码")
    private String orderCode;


    @ApiModelProperty("订单类型 1上门 2外卖")
    private Integer orderType;

    @ApiModelProperty("订单类型拓展 1上门 2骑手配送 3商家配送")
    private Integer orderTypeExtra;


    @ApiModelProperty("订单父id")
    private Long parentId;


    @ApiModelProperty("打包费")
    private BigDecimal packMoney;


    @ApiModelProperty("跑腿费")
    private BigDecimal errandMoney;

    @ApiModelProperty("跑腿费达到商家满减要求 商家承担配送费")
    private String errandMoneyIsShop;

    @ApiModelProperty("订单状态 0待结算 1待支付 2直接购买（未支付） 7商家待接单 8商家拒绝接单 6制作中  3待取餐/派送中 4已完成 5已取消 13外卖待接单")
    private Integer status;


    @ApiModelProperty("是否开启自动派单 0开启 1关闭")
    private Integer autoSendOrder;


    @ApiModelProperty("是否删除该订单 0未删除 1删除")
    private Integer deleteFlag;

    @ApiModelProperty("支付金额")
    private BigDecimal payMoney;

    @ApiModelProperty("创建拼单人id")
    private Long parentUserId;

    @ApiModelProperty("商铺id")
    private Long shopId;

    @ApiModelProperty("最后一次添加购物车的时间")
    private String addGoodsTime;

    @ApiModelProperty("商家接单时间")
    private String shopReceivingTime;

    @ApiModelProperty("商家本单收入")
    private BigDecimal shopIncomeMoney;

    @ApiModelProperty("商家拒绝接单理由")
    private String shopRefuseToOrder;

    @ApiModelProperty("用户是否已经评论该订单 0未评论 1已评论")
    private Integer commentFlag;

    @ApiModelProperty("订单备注")
    private String remark;

    @ApiModelProperty("送达图片，多个图片之间使用,分割")
    private String deliveryImgs;

    @ApiModelProperty("预定标识 1预订单、0正常单")
    private String reservationFlag;

    @ApiModelProperty("期待送达时间")
    private Date expectDeliveryTime;

    @ApiModelProperty("订单顺序号（当天）")
    private String orderSequence;

    @ApiModelProperty("打印状态  已打印：1 未打印：0")
    private Integer isPrint;

    @ApiModelProperty("商铺名")
    @TableField(exist = false)
    private String shopName;

    @ApiModelProperty("商铺封面图")
    @TableField(exist = false)
    private String shopCover;

    @ApiModelProperty("商铺详细地址")
    @TableField(exist = false)
    private String detailedAddress;

    @ApiModelProperty("商铺配送距离")
    @TableField(exist = false)
    private String distributionDistance;

    @ApiModelProperty("商铺经度")
    @TableField(exist = false)
    private String shopLng;

    @ApiModelProperty("商铺维度")
    @TableField(exist = false)
    private String shopLat;

    @ApiModelProperty("商铺电话")
    @TableField(exist = false)
    private String shopPhone;

    @ApiModelProperty("商铺主营类型")
    @TableField(exist = false)
    private String shopType;

    @ApiModelProperty("商铺主营类型名称")
    @TableField(exist = false)
    private String shopTypeName;

    @TableField(exist = false)
    private List<OrderGoods> orderGoodsList;

    @TableField(exist = false)
    private String avatar;

    @TableField(exist = false)
    private Integer countOrder;

    @TableField(exist = false)
    private BigDecimal skuPrice;

    @TableField(exist = false)
    private BigDecimal couponMoney;

    @TableField(exist = false)
    private String classifyName;

    @TableField(exist = false)
    private Integer Rank;

    @TableField(exist = false)
    private BigDecimal shopMoney;

    @TableField(exist = false)
    private Long indentId;

    @TableField(exist = false)
    private String indentNumber;

    @TableField(exist = false)
    private String indentState;

    @TableField(exist = false)
    private BigDecimal activityDiscountAmount;

    @TableField(exist = false)
    private String activityTitle;

    @TableField(exist = false)
    private Long riderUserId;

    @TableField(exist = false)
    private String riderNickName;

    @TableField(exist = false)
    private String riderAvatar;

    @TableField(exist = false)
    private String riderPhone;

    @TableField(exist = false)
    private BigDecimal exemptMinMoney;

    @TableField(exist = false)
    private BigDecimal minimumDelivery;

    @TableField(exist = false)
    @ApiModelProperty("评价内容")
    private String evaluateMessage;

    @TableField(exist = false)
    @ApiModelProperty("评价内容")
    private String shopReplyMessage;

    @TableField(exist = false)
    @ApiModelProperty("评分")
    private Double score;

    @TableField(exist = false)
    @ApiModelProperty("评论时间")
    private String eCreateTime;

    @TableField(exist = false)
    @ApiModelProperty("用户昵称")
    private String userNickName;

    @TableField(exist = false)
    private Integer isRider;

    @TableField(exist = false)
    @ApiModelProperty("导出商品详情")
    private String detail;

    @TableField(exist = false)
    @ApiModelProperty("导出商品总价")
    private Double sumPrice;

    @TableField(exist = false)
    @ApiModelProperty("站点id")
    private Integer riderStationId;

    @TableField(exist = false)
    @ApiModelProperty("站点名称")
    private String stationName;

    @ApiModelProperty("超时时间")
    private Long timeOut;

    @ApiModelProperty("交易号")
    @TableField(exist = false)
    private String transactionId;

    @ApiModelProperty("优惠券类型 平台/商家优惠券")
    @TableField(exist = false)
    private String couponTypeRemark;

    public TbOrder() {}

    @ApiModelProperty("pay_details 状态")
    @TableField(exist = false)
    private Integer state;

    @ApiModelProperty("接单时间")
    @TableField(exist = false)
    private String receivingTime;

    @ApiModelProperty("完成订单时间")
    @TableField(exist = false)
    private String finishTime;

    @ApiModelProperty("身份证号")
    private String idCard;

    @ApiModelProperty("快跑者回调订单号")
    private String tradeNo;
}
