/**
 * There are <a href="https://github.com/ketayao/keta-custom">keta-custom</a> code generation
 */
package com.sw.mes.production.entity;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

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

/**
 * @Author
 * @Description：
 * @Date: Create in
 * @Modified By:
 */
@Data
@Entity
@Table(name = "production_formula_material_class_detail")
@DynamicUpdate
@DynamicInsert
public class FormulaMaterialClassDetail {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 配方物料分类id
     */
    @Column(nullable = true, length = 20)
    private Long formulaMaterialClassId;

    /**
     * 物料编号
     */
    @Column(nullable = false, length = 50)
    private String materialCode;

    /**
     * 物料编号
     */
    @Column(nullable = false, length = 255)
    private String materialName;

    /**
     * 物料类型名称
     */
    @Column(nullable = false, length = 50)
    private String materialTypeName;

    /**
     * 厂家
     */
    @Column(nullable = false, length = 50)
    private String factory;

    /**
     * 定向标识
     */
    @Column(length = 50)
    private String directionalSign;

    /**
     * 等级
     */
    @Column(length = 20)
    private String level;

    /**
     * 电阻率下限
     */
    @Column(length = 18)
    private BigDecimal resistivityLower;

    /**
     * 电阻率上限
     */
    @Column(length = 18)
    private BigDecimal resistivityUpper;

    /**
     * 粒经下限
     * alter table production_formula_material_class_detail add column grain_size_lower decimal(18,2) comment '粒经下限' after resistivity_upper;
     */
    @Column(length = 18)
    private BigDecimal grainSizeLower;

    /**
     * 粒经上限
     * alter table production_formula_material_class_detail add column grain_size_upper decimal(18,2) comment '粒经上限' after grain_size_lower;
     */
    @Column(length = 18)
    private BigDecimal grainSizeUpper;

    /**
     * 创建人
     */
    @Column(nullable = false, length = 20)
    private String userCreate;

    /**
     * 创建时间
     */
    @Column(nullable = false, length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date gmtCreate;

    /**
     * 修改人
     */
    @Column(length = 20)
    private String userUpdate;

    /**
     * 修改时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date gmtUpdate;


    public FormulaMaterialClassDetail() {
    }

    public FormulaMaterialClassDetail(Long id) {
        this.id = id;
    }
}
