package cn.com.ty.lift.ud.motiontrail.mapper.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import cn.com.ty.lift.ud.userInfo.mapper.entity.UserInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 人员轨迹
 *
 * @author Xson
 * @date 2020-07-15
 */
@Data
@ApiModel(description = "人员轨迹")
@TableName(value = "motion_trail")
public class MotionTrail {

    @TableId
    private Integer id;

    @ApiModelProperty("公司ID")
    private Long mtCompanyId;

    @ApiModelProperty("用户ID")
    @JsonSerialize(using=ToStringSerializer.class)
    private Long userId;

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

    @ApiModelProperty("位置")
    private String position;

    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    private transient UserInfoEntity userInfo;
}
