package com.bohuikeji.delivery.backstage.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 com.bohuikeji.frame.module.admin.annotation.TableNewField;
import com.bohuikeji.frame.module.admin.annotation.TableQueryField;
import com.bohuikeji.frame.module.admin.annotation.TableShowField;
import com.bohuikeji.frame.module.admin.base.EntityBase;
import com.bohuikeji.frame.module.admin.constant.RegEx;
import com.bohuikeji.frame.module.admin.entity.web.block.DateBlock;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 派送员跟踪记录
 * </p>
 *
 * @author 10552
 * @since 2019-08-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TTrack对象", description="派送员跟踪记录表")
@TableName("t_track")
public class TTrack extends EntityBase<TTrack> {

    @ApiModelProperty(value="派送员跟踪id(新增时请留空或null)")
    @TableId(value = "track_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true)
    @TableNewField(show = false)
    private Integer trackId;

    @ApiModelProperty(value = "派送员id")
    @TableField("courier_id")
    @TableQueryField(show = false)
    @TableShowField(value = "员工编号")
    private Integer courierId;

    @ApiModelProperty(value = "精度")
    @TableField("lon")
    @TableQueryField(show = false)
    @TableShowField(value = "精度")
    @TableNewField
    private String lon;

    @ApiModelProperty(value = "纬度")
    @TableField("lat")
    @TableShowField(value = "纬度")
    @TableNewField(limit = RegEx.INTEGER)
    @TableQueryField(show = false)
    private String lat;

    @ApiModelProperty(value = "更新时间")
    @TableField("track_time")
    @TableShowField(value = "更新时间",show = false)
    @TableNewField(block = DateBlock.class)
    private LocalDateTime trackTime;


}
