package com.sqx.modules.errand.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@Data
@ApiModel("tb_indent")
public class TbIndent implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)

    @ApiModelProperty("主键id")
    private Long indentId;

    @ApiModelProperty("订单类型（1：帮我送；2：帮我取；3：同城帮买；4：同城服务）")
    private String indentType;

    @ApiModelProperty("外卖订单id")
    private Long orderId;

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

    /**
     * 付款订单号
     */
    private String payOrdersNo;

    @ApiModelProperty("发货人名称")
    private String shopName;

    @ApiModelProperty("发货人手机")
    private String shopPhone;

    @ApiModelProperty("发货人地址（省）")
    private String shopProvince;

    @ApiModelProperty("发货人地址（市）")
    private String shopCity;

    @ApiModelProperty("发货人地址（区）")
    private String shopDistrict;

    @ApiModelProperty("发货人经度")
    private Double shopLng;

    @ApiModelProperty("发货人维度")
    private Double shopLat;

    @ApiModelProperty("发货人详细地址")
    private String shopAddressDetail;

    @ApiModelProperty("收货人姓名")
    private String userName;

    @ApiModelProperty("收货人手机")
    private String userPhone;

    @ApiModelProperty("收货人地址（省）")
    private String userProvince;

    @ApiModelProperty("收货人地址（市）")
    private String userCity;

    @ApiModelProperty("收货人地址（区）")
    private String userDistrict;

    @ApiModelProperty("收货地址经度")
    private Double userLng;

    @ApiModelProperty("收货地址维度")
    private Double userLat;

    @ApiModelProperty("收货人详细地址")
    private String userAddressDetail;

    @ApiModelProperty("帮我送的送货时间")
    private String sendOutTime;

    @ApiModelProperty("物品类型")
    private String itemType;

    @ApiModelProperty("物品价值")
    private String itemValue;

    @ApiModelProperty("物品重量")
    private String itemWeight;

    @ApiModelProperty("物品保价金额")
    private String itemMoney;

    @ApiModelProperty("保价费")
    private BigDecimal cargoInsurance;

    @ApiModelProperty("用户是否需要保价费 0：需要 1：不需要")
    private Integer cargoInsuranceFlag;

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

    @ApiModelProperty("商品详情")
    private String productDetails;

    @ApiModelProperty("购买类型（0：骑手就近购买；1：用户指定地址购买")
    private String buyType;

    @ApiModelProperty("商品费")
    private BigDecimal prepayMoney;

    @ApiModelProperty("距离")
    private Double distance;

    @ApiModelProperty("同城服务类型")
    private String serviceType;

    @ApiModelProperty("服务详情")
    private String serviceDetails;

    @ApiModelProperty("自带配件")
    private String tool;

    @ApiModelProperty("保修期")
    private String warrantyPeriod;

    @ApiModelProperty("是否有收货码 0：有收货码 1：没有收货码")
    private Integer itemCodeFlag;

    @ApiModelProperty("收货码")
    private String orderCode;

    @ApiModelProperty("备注")
    private String remarks;

    @ApiModelProperty("骑手收入")
    private BigDecimal riderMoney;

    @ApiModelProperty("小费金额")
    private BigDecimal tip;

    @ApiModelProperty("红包id")
    private Long redPacketId;

    @ApiModelProperty("订单基础价格")
    private BigDecimal indentBasicsMoney;

    @ApiModelProperty("订单价格（总价格）")
    private BigDecimal indentMoney;

    @ApiModelProperty("平台收入")
    private BigDecimal platformMoney;

    @ApiModelProperty("支付方式")
    private String modeOfPayment;

    @ApiModelProperty("订单状态（0：已下单未支付1：超时关闭未支付订单2：已支付3：骑手已接单4：骑手已取货/购买6：订单已完成8：用户取消订单9：" +
            "骑手取消订单10：平台下架订单 11：外卖订单下单后生成跑腿订单，只参与群聊，无法被接单")
    private String indentState;

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

    @ApiModelProperty("接单时间")
    private String receivingTime;

    @ApiModelProperty("完成订单时间")
    private String finishTime;

    @ApiModelProperty("取消订单时间")
    private Date cancelIndentTime;

    @ApiModelProperty("用户取消订单罚金")
    private BigDecimal userFine;

    @ApiModelProperty("骑手取消订单的罚金")
    private BigDecimal riderFine;

    @ApiModelProperty("骑手id")
    private Long riderUserId;

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

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

    private Integer isRider;

    /**
     * 非实体字段  骑手位置经度
     */
    @TableField(exist = false)
    private double riderlng;
    /**
     * 非实体字段  骑手位置维度
     */
    @TableField(exist = false)
    private double riderlat;
    /**
     * 非实体字段  分页
     */
    @TableField(exist = false)
    private Integer page;
    /**
     * 非实体字段  分页
     */
    @TableField(exist = false)
    private Integer limit;
    /**
     * 非实体字段  接单模式
     */
    @TableField(exist = false)
    private String receivingPettern;
    /**
     * 非实体字段  骑手和起点距离
     */
    @TableField(exist = false)
    private Double distancess;
    /**
     * 非实体字段  骑手和终点距离
     */
    @TableField(exist = false)
    private String distancessd;

    @TableField(exist = false)
    private String nickName;

    @TableField(exist = false)
    private String riderNickName;

    @TableField(exist = false)
    private String riderPhone;

    @TableField(exist = false)
    private String phone;

    @TableField(exist = false)
    private String avatar;

    @TableField(exist = false)
    private BigDecimal moneyOrder;

    @TableField(exist = false)
    private Integer rankNum;

    @TableField(exist = false)
    private String address;

    @TableField(exist = false)
    private BigDecimal redPacketAmount;

    @TableField(exist = false)
    private Integer evaluateMessage;



    public TbIndent() {}
}