package com.xkrs.model.entity;

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

/**
 * SysAuthority 表实体类
 * @author tajochen
 */
@Entity
@Table(name="sys_authority")
public class SysAuthorityEntity implements Serializable {

    /**
     * 指定主键，建立自增序列，主键值取自序列
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    //@SequenceGenerator(name = "sys_authority_seq_gen", sequenceName = "sys_authority_id_seq")
    private Integer id;

    @Column(length = 64, nullable = false, unique = true,columnDefinition = "varchar(64)")
    private String authorityName;

    @Column(length = 64, columnDefinition = "varchar(64)")
    private String authorityNameZh;

    @Column(length = 128, columnDefinition = "varchar(128)")
    private String authorityDesc;

    public Integer getId() {
        return id;
    }

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

    public String getAuthorityName() {
        return authorityName;
    }

    public void setAuthorityName(String authorityName) {
        this.authorityName = authorityName == null ? null : authorityName.trim();
    }

    public String getAuthorityNameZh() {
        return authorityNameZh;
    }

    public void setAuthorityNameZh(String authorityNameZh) {
        this.authorityNameZh = authorityNameZh == null ? null : authorityNameZh.trim();
    }

    public String getAuthorityDesc() {
        return authorityDesc;
    }

    public void setAuthorityDesc(String authorityDesc) {
        this.authorityDesc = authorityDesc == null ? null : authorityDesc.trim();
    }

    @Override
    public String toString() {
        return "SysAuthorityEntity{" +
                "id=" + id +
                ", authorityName='" + authorityName + '\'' +
                ", authorityDesc='" + authorityDesc + '\'' +
                ", authorityNameZh='" + authorityNameZh + '\'' +
                '}';
    }
}
