153 lines
4.6 KiB
Java
153 lines
4.6 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.annotation.JsonFormat;
|
||
|
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||
|
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||
|
|
import com.gunshi.core.dateformat.DateFormatString;
|
||
|
|
import com.gunshi.file.model.FileDescriptor;
|
||
|
|
import com.gunshi.project.xyt.service.AbstractModelWithAttachService;
|
||
|
|
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.math.BigDecimal;
|
||
|
|
import java.util.Date;
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 抢险队伍
|
||
|
|
*/
|
||
|
|
@Schema(description="抢险队伍")
|
||
|
|
@Data
|
||
|
|
@TableName(value = "public.rescue_team_b")
|
||
|
|
public class RescueTeamB implements Serializable, AbstractModelWithAttachService.GetFileIds {
|
||
|
|
/**
|
||
|
|
* 主键
|
||
|
|
*/
|
||
|
|
@TableId(value = "team_id", type = IdType.INPUT)
|
||
|
|
@Schema(description="主键")
|
||
|
|
@NotNull(message = "主键不能为空", groups = {Update.class})
|
||
|
|
@JsonSerialize(using = ToStringSerializer.class)
|
||
|
|
private Long teamId;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 队伍名称
|
||
|
|
*/
|
||
|
|
@TableField(value = "team_name")
|
||
|
|
@Schema(description="队伍名称")
|
||
|
|
@Size(max = 100,message = "队伍名称最大长度要小于 100")
|
||
|
|
@NotEmpty(message = "队伍名称不能为空", groups = {Insert.class, Update.class})
|
||
|
|
private String teamName;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 地址
|
||
|
|
*/
|
||
|
|
@TableField(value = "address")
|
||
|
|
@Schema(description="地址")
|
||
|
|
@NotEmpty(message = "地址不能为空", groups = {Insert.class, Update.class})
|
||
|
|
private String address;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 经度 (°)
|
||
|
|
*/
|
||
|
|
@TableField(value = "lgtd")
|
||
|
|
@Schema(description="经度 (°)")
|
||
|
|
private BigDecimal lgtd;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 纬度 (°)
|
||
|
|
*/
|
||
|
|
@TableField(value = "lttd")
|
||
|
|
@Schema(description="纬度 (°)")
|
||
|
|
private BigDecimal lttd;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 管理单位
|
||
|
|
*/
|
||
|
|
@TableField(value = "management_unit")
|
||
|
|
@Schema(description="管理单位")
|
||
|
|
@Size(max = 150,message = "管理单位最大长度要小于 150", groups = {Insert.class, Update.class})
|
||
|
|
private String managementUnit;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 队伍负责人
|
||
|
|
*/
|
||
|
|
@TableField(value = "team_leader")
|
||
|
|
@Schema(description="队伍负责人")
|
||
|
|
@Size(max = 150,message = "队伍负责人最大长度要小于 150", groups = {Insert.class, Update.class})
|
||
|
|
private String teamLeader;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 联系电话
|
||
|
|
*/
|
||
|
|
@TableField(value = "phone")
|
||
|
|
@Schema(description="联系电话")
|
||
|
|
@Size(max = 20,message = "联系电话最大长度要小于 20", groups = {Insert.class, Update.class})
|
||
|
|
private String phone;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 登记日期
|
||
|
|
*/
|
||
|
|
@TableField(value = "register_date")
|
||
|
|
@Schema(description="登记日期")
|
||
|
|
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||
|
|
@NotNull(message = "登记日期不能为空", groups = {Insert.class, Update.class})
|
||
|
|
private Date registerDate;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 有效期开始时间
|
||
|
|
*/
|
||
|
|
@TableField(value = "valid_start_date")
|
||
|
|
@Schema(description="有效期开始时间")
|
||
|
|
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||
|
|
@NotNull(message = "有效期开始时间不能为空", groups = {Insert.class, Update.class})
|
||
|
|
private Date validStartDate;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 有效期结束时间
|
||
|
|
*/
|
||
|
|
@TableField(value = "valid_end_date")
|
||
|
|
@Schema(description="有效期结束时间")
|
||
|
|
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||
|
|
@NotNull(message = "有效期结束时间不能为空", groups = {Insert.class, Update.class})
|
||
|
|
private Date validEndDate;
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 时间戳
|
||
|
|
*/
|
||
|
|
@TableField(value = "tm")
|
||
|
|
@Schema(description="时间戳")
|
||
|
|
@NotNull(message = "时间戳不能为空")
|
||
|
|
private Date tm;
|
||
|
|
|
||
|
|
@TableField(exist = false)
|
||
|
|
@Schema(description = "文件id集合")
|
||
|
|
private List<String> fileIds;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 文件上传数据
|
||
|
|
*/
|
||
|
|
@Schema(description="文件上传数据")
|
||
|
|
@TableField(exist = false)
|
||
|
|
private List<FileDescriptor> files;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 队伍明细
|
||
|
|
*/
|
||
|
|
@Schema(description="队伍明细")
|
||
|
|
@TableField(exist = false)
|
||
|
|
private List<RescueTeamDetail> details;
|
||
|
|
|
||
|
|
private static final long serialVersionUID = 1L;
|
||
|
|
|
||
|
|
}
|