117 lines
3.5 KiB
Java
117 lines
3.5 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.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;
|
||
|
|
|
||
|
|
}
|