105 lines
3.1 KiB
Java
105 lines
3.1 KiB
Java
|
|
package com.gunshi.project.xyt.model;
|
|||
|
|
|
|||
|
|
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.databind.annotation.JsonSerialize;
|
|||
|
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|||
|
|
import com.gunshi.project.xyt.validate.markers.Insert;
|
|||
|
|
import com.gunshi.project.xyt.validate.markers.Update;
|
|||
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|||
|
|
import jakarta.validation.constraints.NotEmpty;
|
|||
|
|
import jakarta.validation.constraints.NotNull;
|
|||
|
|
import jakarta.validation.constraints.Size;
|
|||
|
|
import lombok.Data;
|
|||
|
|
|
|||
|
|
import java.io.Serializable;
|
|||
|
|
import java.util.Date;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 抢险队伍明细
|
|||
|
|
*/
|
|||
|
|
@Schema(description="抢险队伍明细")
|
|||
|
|
@Data
|
|||
|
|
@TableName(value = "public.rescue_team_detail")
|
|||
|
|
public class RescueTeamDetail implements Serializable {
|
|||
|
|
/**
|
|||
|
|
* 主键
|
|||
|
|
*/
|
|||
|
|
@TableId(value = "detail_id", type = IdType.INPUT)
|
|||
|
|
@Schema(description="主键")
|
|||
|
|
@NotNull(message = "主键不能为空", groups = {Update.class})
|
|||
|
|
@JsonSerialize(using = ToStringSerializer.class)
|
|||
|
|
private Long detailId;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 队伍id
|
|||
|
|
*/
|
|||
|
|
@TableField(value = "team_id")
|
|||
|
|
@Schema(description="队伍id")
|
|||
|
|
@NotNull(message = "队伍id不能为空", groups = {Insert.class, Update.class})
|
|||
|
|
@JsonSerialize(using = ToStringSerializer.class)
|
|||
|
|
private Long teamId;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 姓名
|
|||
|
|
*/
|
|||
|
|
@TableField(value = "name")
|
|||
|
|
@Schema(description="姓名")
|
|||
|
|
@Size(max = 100,message = "姓名最大长度要小于 100")
|
|||
|
|
@NotEmpty(message = "姓名不能为空", groups = {Insert.class, Update.class})
|
|||
|
|
private String name;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 性别,F女,M男
|
|||
|
|
*/
|
|||
|
|
@TableField(value = "sex")
|
|||
|
|
@Schema(description="性别,F女,M男")
|
|||
|
|
@NotNull(message = "性别不能为空", groups = {Insert.class, Update.class})
|
|||
|
|
private String sex;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 年龄
|
|||
|
|
*/
|
|||
|
|
@TableField(value = "age")
|
|||
|
|
@Schema(description="年龄")
|
|||
|
|
@NotNull(message = "年龄不能为空", groups = {Insert.class, Update.class})
|
|||
|
|
private Integer age;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 工作单位
|
|||
|
|
*/
|
|||
|
|
@TableField(value = "work_unit")
|
|||
|
|
@Schema(description="工作单位")
|
|||
|
|
@Size(max = 150,message = "工作单位最大长度要小于 150", groups = {Insert.class, Update.class})
|
|||
|
|
private String workUnit;
|
|||
|
|
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 职务
|
|||
|
|
*/
|
|||
|
|
@TableField(value = "duty")
|
|||
|
|
@Schema(description="职务")
|
|||
|
|
@Size(max = 20,message = "工作单位最大长度要小于 20", groups = {Insert.class, Update.class})
|
|||
|
|
private String duty;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 联系电话
|
|||
|
|
*/
|
|||
|
|
@TableField(value = "phone")
|
|||
|
|
@Schema(description="联系电话")
|
|||
|
|
@Size(max = 20,message = "联系电话最大长度要小于 20", groups = {Insert.class, Update.class})
|
|||
|
|
private String phone;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 时间戳
|
|||
|
|
*/
|
|||
|
|
@TableField(value = "tm")
|
|||
|
|
@Schema(description="时间戳")
|
|||
|
|
@NotNull(message = "时间戳不能为空")
|
|||
|
|
private Date tm;
|
|||
|
|
|
|||
|
|
private static final long serialVersionUID = 1L;
|
|||
|
|
|
|||
|
|
}
|