package org.cs.mgr.admin.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Entity
@Table( name = "mgr_role",uniqueConstraints={@UniqueConstraint(columnNames = {"name","code"})})
public class Role implements Serializable{

    /**
	 * @fieldName: serialVersionUID
	 * @fieldType: long
	 * @Description: TODO
	 */
	private static final long serialVersionUID = -7327493525761303796L;
	private Integer id;    // 角色id
    private String code;  // 角色代码
    private String name;  // 角色名称
    
    private String num;//最下层分类级数
    
    private Integer oneCategoryId;//产品分类id
    private Integer twoCategoryId;//产品分类id
    private Integer threeCategoryId;//产品分类id
    private Integer fourCategoryId;//产品分类id
    
    private String attr1;
    private String attr2;
    private String attr3;
    private String attr4;
    private String attr5;
    private Date createDate;
    private String note;

    
    
    @Column(name = "num", columnDefinition="varchar(2)")
    public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	@Column(name = "one_category_id")
    public Integer getOneCategoryId() {
		return oneCategoryId;
	}

	public void setOneCategoryId(Integer oneCategoryId) {
		this.oneCategoryId = oneCategoryId;
	}

	@Column(name = "two_category_id")
	public Integer getTwoCategoryId() {
		return twoCategoryId;
	}

	public void setTwoCategoryId(Integer twoCategoryId) {
		this.twoCategoryId = twoCategoryId;
	}

	@Column(name = "three_category_id")
	public Integer getThreeCategoryId() {
		return threeCategoryId;
	}

	public void setThreeCategoryId(Integer threeCategoryId) {
		this.threeCategoryId = threeCategoryId;
	}

	@Column(name = "four_category_id")
	public Integer getFourCategoryId() {
		return fourCategoryId;
	}

	public void setFourCategoryId(Integer fourCategoryId) {
		this.fourCategoryId = fourCategoryId;
	}

	@Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    
    
    @Column(name = "name", nullable=false,columnDefinition="varchar(32)")
    public String getName() {
        return name;
    }

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

    @Column(name = "attr1")
    public String getAttr1() {
        return attr1;
    }

    public void setAttr1(String attr1) {
        this.attr1 = attr1;
    }

    @Column(name = "attr2")
    public String getAttr2() {
        return attr2;
    }

    public void setAttr2(String attr2) {
        this.attr2 = attr2;
    }

    @Column(name = "attr3")
    public String getAttr3() {
        return attr3;
    }

    public void setAttr3(String attr3) {
        this.attr3 = attr3;
    }

    @Column(name = "attr4")
    public String getAttr4() {
        return attr4;
    }

    public void setAttr4(String attr4) {
        this.attr4 = attr4;
    }

    @Column(name = "attr5")
    public String getAttr5() {
        return attr5;
    }

    public void setAttr5(String attr5) {
        this.attr5 = attr5;
    }
    
    @Column(name = "create_date")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Column(name = "code", nullable=false,columnDefinition="varchar(32)")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}
	
	
	

    
    
	
}
