package com.example.demo.model;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 角色实体。
 * <p>对应数据库 role 表，存储角色信息及角色状态。</p>
 */
@Schema(description = "角色实体")
public class Role {

    @Schema(description = "角色ID", example = "1")
    private Long roleId;

    @Schema(description = "角色名称", example = "管理员")
    private String roleName;

    @Schema(description = "角色编码", example = "ADMIN")
    private String roleCode;

    @Schema(description = "状态：0-停用，1-启用", example = "1")
    private Integer status;

    @Schema(description = "创建时间", example = "2024-01-01 00:00:00")
    private String createTime;

    public Role() {}

    public Role(Long roleId, String roleName, String roleCode, Integer status, String createTime) {
        this.roleId = roleId;
        this.roleName = roleName;
        this.roleCode = roleCode;
        this.status = status;
        this.createTime = createTime;
    }

    public Long getRoleId() { return roleId; }
    public void setRoleId(Long roleId) { this.roleId = roleId; }
    public String getRoleName() { return roleName; }
    public void setRoleName(String roleName) { this.roleName = roleName; }
    public String getRoleCode() { return roleCode; }
    public void setRoleCode(String roleCode) { this.roleCode = roleCode; }
    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }
    public String getCreateTime() { return createTime; }
    public void setCreateTime(String createTime) { this.createTime = createTime; }
}
