package com.casic.PgInterface.construction.domain;

import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

/**
 * Created by yxw on 2018/4/10.
 */
@Entity
@Table(name = "PG_CONSTRUCTION_TYPE")
@SequenceGenerator(name = "SEQ_PG_CONSTRUCTION_TYPE_ID", sequenceName = "SEQ_PG_CONSTRUCTION_TYPE_ID", allocationSize = 1,initialValue = 1)
public class PgConstructionType implements Serializable {

    private static final long serialVersionUID = 1L;
    private long id;
    private String typeName;//项目状态
    private List<PgConstruction> pgConstructionList;//项目
    private int active;//状态位

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_CONSTRUCTION_TYPE_ID")
    public long getId() {
        return id;
    }

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

    @Column(name = "TYPENAME")
    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Column(name = "ACTIVE")
    public int getActive() {
        return active;
    }

    public void setActive(int active) {
        this.active = active;
    }

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionTypeId")
    public List<PgConstruction> getPgConstructionList() {
        return pgConstructionList;
    }

    public void setPgConstructionList(List<PgConstruction> pgConstructionList) {
        this.pgConstructionList = pgConstructionList;
    }
}
