package com.gunshi.project.hsz.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.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.validate.markers.Update; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.Data; import java.io.Serializable; import java.util.Date; import java.util.List; /** * 工程大事记 */ @Schema(description="工程大事记") @Data @TableName(value = "public.project_events") public class ProjectEvents implements Serializable { /** * 主键 */ @TableId(value = "id", type = IdType.INPUT) @Schema(description="主键") @NotNull(message = "主键不能为空",groups = {Update.class}) @JsonSerialize(using = ToStringSerializer.class) private Long id; @TableField(value = "name") @Schema(description="名称") @NotEmpty(message = "名称不可为空",groups = {Insert.class,Update.class}) private String name; /** * 发生日期 */ @TableField(value = "events_date") @Schema(description="发生日期") @JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8") @NotNull(message = "日期不能为空",groups = {Insert.class,Update.class}) private Date eventsDate; /** * 类型(1综合大事记 2专题大事记) */ @TableField(value = "events_type") @Schema(description="类型(1综合大事记 2专题大事记)") private Integer eventsType; @TableField(value = "events_desc") @Schema(description="事件内容描述") @NotEmpty(message = "事件内容描述不可为空",groups = {Insert.class,Update.class}) private String eventsDesc; @TableField(exist = false) @Schema(description = "文件集合") private List files; private static final long serialVersionUID = 1L; }