package com.sunyard.ssp.modules.user.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author tsz
 * @since 2020-03-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SC_ROLE")
public class ScRole implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("ID")
    private Long id;

    @TableField("NAME")
    private String name;

    @TableField("DEFAULT_ROLE")
    private Boolean defaultRole;

    @TableField("DESCRIPTION")
    private String description;

    @TableField("DATA_TYPE")
    private Integer dataType;

    public ScRole(Long id, String name, Boolean defaultRole, String description, Integer dataType) {
        this.id = id;
        this.name = name;
        this.defaultRole = defaultRole;
        this.description = description;
        this.dataType = dataType;
    }

    public ScRole(ScRole role) {
        this.id = role.id;
        this.name = role.name;
        this.defaultRole = role.defaultRole;
        this.description = role.description;
        this.dataType = role.dataType;
    }

    public ScRole() {
    }
}
