package com.ruoyi.drill.domain;

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.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * DrillInfo
 *
 * @Auther: mtx
 * @Date: 2023/09/25 16:41
 */
@Data
@TableName("ty_drill_info")
public class TyDrillInfo {

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @NotBlank(message = "演练目的不能为空")
    @Size(min = 0, max = 50, message = "演练目的长度不能超过50个字符")
    @ApiModelProperty("演练目的")
    @TableField(value = "drill_objective")
    private String drillObjective;

    @NotNull(message = "演练时间不能为空")
    @ApiModelProperty("演练时间")
    @TableField(value = "drill_time")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date drillTime;

    @NotBlank(message = "演练地点不能为空")
    @Size(min = 0, max = 50, message = "演练地点长度不能超过50个字符")
    @ApiModelProperty("演练地点")
    @TableField(value = "drill_place")
    private String drillPlace;

    @NotBlank(message = "演练依据不能为空")
    @Size(min = 0, max = 50, message = "演练依据长度不能超过50个字符")
    @ApiModelProperty("演练依据")
    @TableField(value = "drill_basis")
    private String drillBasis;

}
