116 lines
3.6 KiB
Java
116 lines
3.6 KiB
Java
package tech.riemann.ims.entity.material;
|
|
|
|
import cn.idev.excel.annotation.ExcelIgnore;
|
|
import cn.idev.excel.annotation.ExcelProperty;
|
|
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Data;
|
|
import lombok.EqualsAndHashCode;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.experimental.Accessors;
|
|
import lombok.experimental.FieldNameConstants;
|
|
import lombok.experimental.SuperBuilder;
|
|
import org.nutz.dao.entity.annotation.*;
|
|
import tech.riemann.ims.entity.IdBaseEntity;
|
|
|
|
import java.io.Serial;
|
|
import java.math.BigDecimal;
|
|
|
|
@Data
|
|
@SuperBuilder
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@FieldNameConstants
|
|
@EqualsAndHashCode(callSuper = true)
|
|
@Accessors(chain = true)
|
|
@TableName("t_material")
|
|
@Table("t_material")
|
|
@Comment("物料")
|
|
@Schema(name = "Material", description = "物料")
|
|
public class Material extends IdBaseEntity {
|
|
|
|
@Serial
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
@Schema(description = "编码", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@TableField("m_code")
|
|
@Column("m_code")
|
|
@Comment("编码")
|
|
@ColDefine(notNull = false, width = 128, precision = 0)
|
|
@ExcelProperty("物料编码")
|
|
@ColumnWidth(40)
|
|
private String code;
|
|
|
|
@Schema(description = "名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@TableField("m_name")
|
|
@Column("m_name")
|
|
@Comment("名称")
|
|
@ColDefine(notNull = false, width = 128, precision = 0)
|
|
@ExcelProperty("物料名称")
|
|
@ColumnWidth(60)
|
|
private String name;
|
|
|
|
@Schema(description = "是否赋码", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@TableField("m_assign_rule")
|
|
@Column("m_assign_rule")
|
|
@Comment("赋码规则")
|
|
@ColDefine(notNull = false, type = ColType.INT)
|
|
@ExcelProperty("是否赋码")
|
|
@ColumnWidth(40)
|
|
private Boolean assignRule; // 0-低值易耗品(不参与赋码) 1-高价值工具类(参与唯一赋码)
|
|
|
|
@Schema(description = "类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@TableField("m_type")
|
|
@Column("m_type")
|
|
@Comment("类型")
|
|
@ColDefine(notNull = false, width = 128, precision = 0)
|
|
@ExcelIgnore
|
|
private String type;
|
|
|
|
@TableField(exist = false)
|
|
@ExcelProperty("物料类型")
|
|
@ColumnWidth(40)
|
|
private String typeName;
|
|
|
|
@Schema(description = "价格", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@TableField("m_price")
|
|
@Column("m_price")
|
|
@Comment("价格")
|
|
@ColDefine(notNull = false, width = 18, precision = 0)
|
|
@ExcelProperty("价格")
|
|
@ColumnWidth(40)
|
|
private BigDecimal price;
|
|
|
|
@Schema(description = "规格", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@TableField("m_spec")
|
|
@Column("m_spec")
|
|
@Comment("规格")
|
|
@ColDefine(notNull = false, width = 128, precision = 0)
|
|
@ExcelProperty("物料型号")
|
|
@ColumnWidth(40)
|
|
private String spec;
|
|
|
|
|
|
@Schema(description = "库存数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@TableField("m_stock")
|
|
@Column("m_stock")
|
|
@Comment("库存数量")
|
|
@ColDefine(notNull = false, type = ColType.INT)
|
|
@ExcelProperty("库存数量")
|
|
@ColumnWidth(40)
|
|
private Integer stock;
|
|
|
|
@Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@TableField("m_description")
|
|
@Column("m_description")
|
|
@Comment("备注")
|
|
@ColDefine(notNull = false, width = 500, precision = 0)
|
|
@ColumnWidth(40)
|
|
private String description;
|
|
|
|
|
|
}
|