package com.bohuikeji.delivery.backstage.entity;

import com.bohuikeji.frame.module.admin.annotation.TableKeyField;
import com.bohuikeji.frame.module.admin.annotation.TableQueryField;
import com.bohuikeji.frame.module.admin.base.EntityBase;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.bohuikeji.frame.module.admin.annotation.TableShowField;
import com.bohuikeji.frame.module.admin.annotation.TableNewField;
import com.bohuikeji.frame.module.admin.entity.web.block.SelectBlock;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 物流跟踪记录表
 * </p>
 *
 * @author 10552
 * @since 2019-12-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TLogisticsRecord对象", description="物流跟踪记录表")
public class TLogisticsRecord extends EntityBase<TLogisticsRecord> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "record_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true,show = false)
    @TableNewField(show = false)
    private Integer recordId;

    @ApiModelProperty(value = "上报时间")
    @TableField("record_time")
    @TableShowField("上报时间")
    @TableQueryField(like = false)
    @TableNewField()
    private LocalDateTime recordTime=LocalDateTime.now();

    @ApiModelProperty(value = "包裹纬度")
    @TableField("record_lat")
    private String recordLat;

    @ApiModelProperty(value = "包裹经度")
    @TableField("record_lng")
    private String recordLng;

    @ApiModelProperty(value = "包裹物流状态")
    @TableField("logistics_status")
    @TableShowField("物流状态")
    @TableQueryField(like = false)
    @TableNewField(block = SelectBlock.class)
    private String logisticsStatus;

    @ApiModelProperty(value = "派送员id")
    @TableField("courier_id")
    @TableShowField(value = "派送员",show = false)
    @TableKeyField(table = "t_courier",keyLikeFields = "courier_name",keyShowFields = "courier_name")
    @TableQueryField
    @TableNewField(block = SelectBlock.class)
    private Integer courierId;

    @ApiModelProperty(value = "物流id")
    @TableField("logistics_id")
    private Integer logisticsId;

    @ApiModelProperty(value = "物流编号")
    @TableField("logistics_num")
    @TableShowField("物流编号")
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private String logisticsNum;

    @ApiModelProperty(value = "订单id")
    @TableField("order_id")
    private Integer orderId;

    @ApiModelProperty(value = "订单编号")
    @TableField("order_num")
    @TableShowField("订单编号")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String orderNum;


}
