package com.fzm.mall.server.admin.auth_center.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author wangp
 * @date 2021/4/8 13:41
 * @description 管理员橘色
 * @since JDK 1.8
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("admin_role")
@ApiModel(value = "AdminRole对象", description = "")
public class AdminRole implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    private Long id;

    @ApiModelProperty(value = "管理员角色id")
    private String roleId;

    @ApiModelProperty(value = "角色名称")
    private String roleName;

    @ApiModelProperty(value = "类别 (1.平台默认角色 2.商户默认角色 3.平台商户默认角色 4.平台角色 5.商户角色 6.平台商户角色)")
    private Integer type;

    @ApiModelProperty(value = "状态(0.正常 1.禁用)")
    private Integer status;

    @ApiModelProperty(value = "权限json")
    private String authJson;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Long createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateTime;

    public AdminRole() {
    }

    public AdminRole(String roleName, Integer type, Integer status, String authJson, String remarks) {
        this.roleName = roleName;
        this.type = type;
        this.status = status;
        this.authJson = authJson;
        this.remarks = remarks;
    }
}
