package com.xkrs.model.entity;

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

/**
 * SysRole 表实体类
 * @author tajochen
 */
@Entity
@Table(name="sys_role")
public class SysRoleEntity implements Serializable {

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

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

    @Column(length = 32, columnDefinition = "varchar(32)")
    private String roleNameZh;

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

    public Integer getId() {
        return id;
    }

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

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName == null ? null : roleName.trim();
    }

    public String getRoleDesc() {
        return roleDesc;
    }

    public void setRoleDesc(String roleDesc) {
        this.roleDesc = roleDesc == null ? null : roleDesc.trim();
    }

    public String getRoleNameZh() {
        return roleNameZh;
    }

    public void setRoleNameZh(String roleNameZh) {
        this.roleNameZh = roleNameZh == null ? null : roleNameZh.trim();
    }

    @Override
    public String toString() {
        return "SysRoleEntity{" +
                "id=" + id +
                ", roleName='" + roleName + '\'' +
                ", roleNameZh='" + roleNameZh + '\'' +
                ", roleDesc='" + roleDesc + '\'' +
                '}';
    }
}
