package com.sw.mes.crucible.entity;

import com.sw.mes.base.factory.init.entity.Equipment;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;
import java.util.Date;

/**
 * @author lf
 * @description 坩埚定投管理
 * @date 2024/1/8 8:56
 */
@Data
@Entity
@Table(name = "crucible_fixed_casting")
@DynamicUpdate
@DynamicInsert
public class CrucibleFixedCasting {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    /**
     * 设备信息
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @NotFound(action = NotFoundAction.IGNORE)
    @JoinColumn(name = "equipment_id", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private Equipment equipment;
    /**
     * 设备号
     */
    @Column
    private String equipmentCode;
    /**
     * 料号
     */
    @Column(length = 50)
    private String code;
    /**
     * 定投类型
     */
    @Column(length = 20)
    private String fixedCastingType;
    /**
     * 定投炉数
     */
    @Column(length = 20)
    private Integer fixedCastingNumber;
    /**
     * 完成数量
     */
    @Column(length = 20)
    private Integer completeNumber;
    /**
     * 尺寸
     */
    @Column(length = 50)
    private String dimension;
    /**
     * 品类
     */
    @Column(length = 50)
    private String category;
    /**
     * 等级
     */
    @Column(length = 20)
    private String level;
    /**
     * 厂家
     */
    @Column(length = 50)
    private String manufacturer;
    /**
     * 高度
     */
    @Column(length = 20)
    private String height;
    /**
     * 满锅料量
     */
    @Column(length = 20)
    private String fullPotCapacity;
    /**
     * 创建人
     */
    @Column(length = 50)
    private String createUser;
    /**
     * 创建时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;
    /**
     * 修改人
     */
    @Column(length = 50)
    private String updateUser;
    /**
     * 修改时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateDate;
}
