79 lines
2.4 KiB
Java
79 lines
2.4 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.gunshi.core.dateformat.DateFormatString;
|
|
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.NotBlank;
|
|
import jakarta.validation.constraints.NotNull;
|
|
import jakarta.validation.constraints.Size;
|
|
import lombok.Data;
|
|
import lombok.experimental.Accessors;
|
|
|
|
import java.io.Serializable;
|
|
import java.math.BigDecimal;
|
|
import java.util.Date;
|
|
|
|
/**
|
|
* 描述: 水库月核定生态流量表
|
|
* author: xusan
|
|
* date: 2024-07-08 17:34:26
|
|
*/
|
|
@Schema(description="水库月核定生态流量表")
|
|
@Data
|
|
@TableName("public.res_month_eco_flow")
|
|
@Accessors(chain = true) // chain = true 实现链式调用
|
|
public class ResMonthEcoFlow implements Serializable {
|
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* 主键
|
|
*/
|
|
@TableId(value="id", type= IdType.AUTO)
|
|
@Schema(description="主键")
|
|
@NotNull(message = "主键不能为空",groups = {Update.class})
|
|
private Long id;
|
|
|
|
/**
|
|
* 水库代码
|
|
*/
|
|
@TableField(value="res_code")
|
|
@Schema(description="水库代码")
|
|
@Size(max = 32,message = "水库代码最大长度要小于 32",groups = {Update.class, Insert.class})
|
|
@NotBlank(message = "水库代码不能为空",groups = {Update.class, Insert.class})
|
|
private String resCode;
|
|
|
|
/**
|
|
* 月份
|
|
*/
|
|
@TableField(value="month")
|
|
@Schema(description="月份")
|
|
// @Size(max = 0,message = "月份最大长度要小于 0")
|
|
private Integer month;
|
|
|
|
/**
|
|
* 流量
|
|
*/
|
|
@TableField(value="value")
|
|
@Schema(description="流量")
|
|
// @Size(max = 0,message = "流量最大长度要小于 0")
|
|
private BigDecimal value;
|
|
|
|
/**
|
|
* 时间戳
|
|
*/
|
|
@TableField(value="moditime")
|
|
@Schema(description="时间戳")
|
|
// @Size(max = 0,message = "时间戳最大长度要小于 0")
|
|
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
|
private Date moditime;
|
|
|
|
} |