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.vo.AddressVo;
import com.bohuikeji.frame.module.admin.entity.web.block.FileBlock;
import com.bohuikeji.frame.module.admin.entity.web.block.SelectBlock;
import com.bohuikeji.frame.module.admin.entity.web.block.TextBlock;
import com.bohuikeji.frame.module.admin.enums.ColumnTypeEnum;
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="TLogistics对象", description="物流包裹信息表")
public class TLogistics extends EntityBase<TLogistics> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "物流信息id")
    @TableId(value = "logistics_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true,show = false)
    @TableNewField(show = false)
    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;

    @ApiModelProperty(value = "包裹照片")
    @TableField("cargo_photos")
    @TableShowField(value = "包裹照片",type = ColumnTypeEnum.IMAGE)
    @TableNewField(block = FileBlock.class,required = false)
    private String cargoPhotos;

    @ApiModelProperty(value = "签收照片")
    @TableField("sign_photos")
    @TableShowField(value = "签收照片",type = ColumnTypeEnum.IMAGE)
    @TableNewField(block = TextBlock.class,required = false)
    private String signPhotos;

    @ApiModelProperty(value = "签收距离")
    @TableField("sign_distance")
    @TableShowField(value = "签收距离(米)")
    @TableNewField(block = TextBlock.class,required = false)
    private Integer signDistance;

    @ApiModelProperty(value = "签收地址")
    @TableField("sign_address")
    @TableShowField(value = "收件地址",show = true)
    @TableNewField(show = true)
    private AddressVo signAddress;

    @ApiModelProperty(value = "签收方式")
    @TableField("sign_method")
    @TableShowField(value = "签收方式",show = true)
    @TableNewField(show = true)
    private String signMethod;

    @ApiModelProperty(value = "下单人id")
    @TableField("player_id")
    @TableShowField(value = "下单用户")
    @TableKeyField(table = "t_customer",keyLikeFields = "customer_name",keyShowFields = "customer_name")
    @TableQueryField(like = false)
    @TableNewField(block = SelectBlock.class)
    private Integer playerId;

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

    @ApiModelProperty(value = "实际运输车辆")
    @TableField("vehicle_id")
    @TableShowField(value = "实际运输车辆",show = false)
    @TableKeyField(table = "t_vehicle_information",keyLikeFields = "vehicle_number",keyShowFields = "vehicle_number")
    @TableQueryField(like = false)
    @TableNewField(block = SelectBlock.class,required = false)
    private Integer vehicleId;

    @ApiModelProperty(value = "派送员备注")
    @TableField("courier_remakrs")
    @TableShowField(value = "派送员备注",show = false)
    @TableNewField(block = TextBlock.class,required = false)
    private String courierRemakrs;

    @ApiModelProperty(value = "后台备注")
    @TableField("admin_remarks")
    @TableShowField(value = "后台备注",show = false)
    @TableNewField(block = TextBlock.class,required = false)
    private String adminRemarks;

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

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    @TableShowField("创建时间")
    @TableQueryField(like = false,sort = 0)
    @TableNewField
    private LocalDateTime createTime=LocalDateTime.now();

}
