package com.sw.mes.yb.deviceCheck.entity;


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

import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

/**
 * 点检项目
 */
@Entity
@Table(name = "zhxx_operate_spot_check")
@DynamicUpdate
@DynamicInsert
public class SpotCheck {

    /**
     * 主键ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 点检名称
     */
    @Column
    private String name;

    /**
     * 点检类别
     */
    @Column(length = 80)
    private String type;

    /**
     * 点检子项
     */
    @Transient
    private List<SpotCheckItem> itemList = new ArrayList<>();

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public List<SpotCheckItem> getItemList() {
        return itemList;
    }

    public void setItemList(List<SpotCheckItem> itemList) {
        this.itemList = itemList;
    }
}
