package com.lutao.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.lutao.annotate.Validation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "平台人员信息")
@TableName("platform_person_info")
public class PlatformPersonInfo extends Model<PlatformPersonInfo> {
    private static final long serialVersionUID = -4475431377800265492L;

    @ApiModelProperty(value = "主键")
    @TableId
    private Integer id;

    @ApiModelProperty(value = "原始id")
    @Validation(message = "platfrom_person_info表{id}不能为空")
    private String originId;

    @ApiModelProperty(value = "appId")
    private String appId;

    @ApiModelProperty(value = "平台编码")
    @Validation(message = "platfrom_person_info表{platform_code}不能为空")
    private String platformCode;

    @ApiModelProperty(value = "人员类型 1内部人员 2承包商 3临时 4其他")
    @Validation(message = "platfrom_person_info表{person_type}不能为空")
    private String personType;

    @ApiModelProperty(value = "人员数量")
    @Validation(message = "platfrom_person_info表{person_sum}不能为空")
    private Integer personSum;

    @ApiModelProperty(value = "数据日期")
    @Validation(message = "platfrom_person_info表{data_date}不能为空")
    private LocalDate dataDate;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "创建人姓名")
    private String createBy;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "修改人")
    private String updateBy;

    @ApiModelProperty(value = "数据收集时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "数据更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}
