gunshi-project-ss/src/main/java/com/gunshi/project/xyt/model/RescueGoodsB.java

117 lines
3.5 KiB
Java
Raw Normal View History

2024-07-08 10:05:02 +08:00
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.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_goods_b")
public class RescueGoodsB implements Serializable, AbstractModelWithAttachService.GetFileIds {
/**
*
*/
@TableId(value = "goods_id", type = IdType.INPUT)
@Schema(description="主键")
@NotNull(message = "主键不能为空", groups = {Update.class})
@JsonSerialize(using = ToStringSerializer.class)
private Long goodsId;
/**
*
*/
@TableField(value = "goods_name")
@Schema(description="物资名称")
@Size(max = 100,message = "物资名称最大长度要小于 100")
@NotEmpty(message = "物资名称不能为空", groups = {Insert.class, Update.class})
private String goodsName;
/**
* (1 2)
*/
@TableField(value = "goods_type")
@Schema(description="物资类型(1抢险物资 2救生器材)")
@NotNull(message = "物资类型不能为空", groups = {Insert.class, Update.class})
private Integer goodsType;
/**
*
*/
@TableField(value = "specs")
@Schema(description="规格")
private String specs;
/**
* (1 2 3 4 5 6 7 8 9 10 11)
*/
@TableField(value = "unit")
@Schema(description="单位(1个 2件 3米 4把 5台 6套 7副 8箱 9卷 10立方米 11平方米)")
private Integer unit;
/**
*
*/
@TableField(value = "store_quantity")
@Schema(description="库存数量")
@NotNull(message = "库存数量不能为空", groups = {Insert.class, Update.class})
private BigDecimal storeQuantity;
/**
*
*/
@TableField(value = "store_location")
@Schema(description="存放地点")
private String storeLocation;
/**
*
*/
@TableField(value = "contact_person")
@Schema(description="联系人")
@Size(max = 150,message = "联系人最大长度要小于 150", groups = {Insert.class, Update.class})
private String contactPerson;
/**
*
*/
@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;
@TableField(exist = false)
@Schema(description = "文件id集合")
private List<String> fileIds;
private static final long serialVersionUID = 1L;
}