package com.ruoyi.device.pojo; import com.baomidou.mybatisplus.annotation.FieldFill; 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; @Data @TableName("device_repair_spare_part") public class DeviceRepairSparePart { @Schema(description = "主键ID") @TableId(type = IdType.AUTO) private Long id; @Schema(description = "来源ID(报修单ID或保养单ID)") private Long sourceId; @Schema(description = "来源类型:1-报修,2-保养") private Integer sourceType; @Schema(description = "配件ID") private Long sparePartId; @Schema(description = "使用数量") private Integer quantity; @Schema(description = "配件名称(非表字段)") @TableField(exist = false) private String sparePartName; @Schema(description = "创建时间") @TableField(fill = FieldFill.INSERT) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createTime; @Schema(description = "更新时间") @TableField(fill = FieldFill.INSERT_UPDATE) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime updateTime; @Schema(description = "创建人") @TableField(fill = FieldFill.INSERT) private Integer createUser; @Schema(description = "更新人") @TableField(fill = FieldFill.INSERT_UPDATE) private Integer updateUser; @Schema(description = "租户id") @TableField(fill = FieldFill.INSERT) private Long tenantId; @TableField(fill = FieldFill.INSERT) private Long deptId; }