package cn.com.ctop.common.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 角色变更记录
 *
 * @author jeecg-boot
 * @version V1.0
 * @date 2022-09-19
 */
@Data
@TableName("sys_role_change_record")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "sys_role_change_record对象", description = "角色变更记录")
public class RoleChangeRecord {

    /**
     * 主键id
     */
    @TableId(type = IdType.UUID)
    @ApiModelProperty(value = "主键id")
    private String id;
    /**
     * userId
     */
    @Excel(name = "userId", width = 15)
    @ApiModelProperty(value = "userId")
    private String userId;
    /**
     * 现在角色名称
     */
    @Excel(name = "现在角色名称", width = 15)
    @ApiModelProperty(value = "现在角色名称")
    private String newRoleName;
    /**
     * 现在角色编码
     */
    @Excel(name = "现在角色编码", width = 15)
    @ApiModelProperty(value = "现在角色编码")
    private String newRoleCode;
    /**
     * 原来角色名称
     */
    @Excel(name = "原来角色名称", width = 15)
    @ApiModelProperty(value = "原来角色名称")
    private String oldRoleName;
    /**
     * 原来角色编码
     */
    @Excel(name = "原来角色编码", width = 15)
    @ApiModelProperty(value = "原来角色编码")
    private String oldRoleCode;
    /**
     * 创建人
     */
    @Excel(name = "创建人", width = 15)
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
