package com.mes.device.entity; import com.baomidou.mybatisplus.annotation.*; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; import java.util.Date; /** * 玻璃信息实体类 * 对应数据库表:glass_info */ @Data @EqualsAndHashCode(callSuper = false) @TableName("glass_info") @ApiModel(value = "GlassInfo", description = "玻璃信息") public class GlassInfo { @ApiModelProperty(value = "主键ID", example = "1") @TableId(value = "id", type = IdType.AUTO) private Long id; @ApiModelProperty(value = "玻璃ID(唯一标识)", example = "GLS-2024-001") @TableField("glass_id") private String glassId; @ApiModelProperty(value = "玻璃长度(mm)", example = "2000") @TableField("glass_length") private Integer glassLength; @ApiModelProperty(value = "玻璃宽度(mm)", example = "1500") @TableField("glass_width") private Integer glassWidth; @ApiModelProperty(value = "玻璃厚度(mm)", example = "5.0") @TableField("glass_thickness") private BigDecimal glassThickness; @ApiModelProperty(value = "玻璃类型", example = "普通玻璃") @TableField("glass_type") private String glassType; @ApiModelProperty(value = "生产厂商", example = "厂商A") @TableField("manufacturer") private String manufacturer; @ApiModelProperty(value = "生产日期") @TableField("production_date") @JsonFormat(pattern = "yyyy-MM-dd") private Date productionDate; @ApiModelProperty(value = "状态:ACTIVE-活跃, ARCHIVED-已归档", example = "ACTIVE") @TableField("status") private String status; @ApiModelProperty(value = "描述信息") @TableField("description") private String description; @ApiModelProperty(value = "产线编号") @TableField("work_line") private Integer workLine; @ApiModelProperty(value = "创建时间") @TableField(value = "created_time", fill = FieldFill.INSERT) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createdTime; @ApiModelProperty(value = "更新时间") @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date updatedTime; @ApiModelProperty(value = "创建人", example = "system") @TableField(value = "created_by", fill = FieldFill.INSERT) private String createdBy; @ApiModelProperty(value = "更新人", example = "system") @TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE) private String updatedBy; @ApiModelProperty(value = "是否删除:0-否,1-是", example = "0") @TableField("is_deleted") @TableLogic private Integer isDeleted; // 状态常量 public static final class Status { public static final String ACTIVE = "ACTIVE"; // 兼容旧数据 public static final String ARCHIVED = "ARCHIVED"; // 已归档 public static final String PENDING = "PENDING"; // 待卧转立处理 public static final String PROCESSED = "PROCESSED"; // 已处理 } }