SysRole.java 2.5 KB
Newer Older
pig_冷冷's avatar
pig_冷冷 已提交
1
/*
2
 *
3
 *      Copyright (c) 2018-2025, lengleng All rights reserved.
4
 *
5 6 7 8 9 10 11 12 13 14 15 16
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: lengleng (wangiegie@gmail.com)
17
 *
pig_冷冷's avatar
pig_冷冷 已提交
18 19 20 21
 */

package com.pig4cloud.pig.admin.api.entity;

22 23
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
24
import io.swagger.v3.oas.annotations.media.Schema;
25
import javax.validation.constraints.NotBlank;
pig_冷冷's avatar
pig_冷冷 已提交
26 27 28
import lombok.Data;
import lombok.EqualsAndHashCode;

29
import java.time.LocalDateTime;
pig_冷冷's avatar
pig_冷冷 已提交
30 31 32 33 34 35 36

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author lengleng
37
 * @since 2017-10-29
pig_冷冷's avatar
pig_冷冷 已提交
38 39
 */
@Data
40
@Schema(description = "角色")
pig_冷冷's avatar
pig_冷冷 已提交
41
@EqualsAndHashCode(callSuper = true)
42
public class SysRole extends Model<SysRole> {
pig_冷冷's avatar
pig_冷冷 已提交
43 44 45

	private static final long serialVersionUID = 1L;

46
	@TableId(value = "role_id", type = IdType.ASSIGN_ID)
47
	@Schema(description = "角色编号")
48
	private Long roleId;
pig_冷冷's avatar
pig_冷冷 已提交
49

50
	@NotBlank(message = "角色名称不能为空")
51
	@Schema(description = "角色名称")
pig_冷冷's avatar
pig_冷冷 已提交
52 53
	private String roleName;

54
	@NotBlank(message = "角色标识不能为空")
55
	@Schema(description = "角色标识")
pig_冷冷's avatar
pig_冷冷 已提交
56 57
	private String roleCode;

58
	@Schema(description = "角色描述")
pig_冷冷's avatar
pig_冷冷 已提交
59 60
	private String roleDesc;

61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
	/**
	 * 创建人
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建人")
	private String createBy;

	/**
	 * 修改人
	 */
	@TableField(fill = FieldFill.UPDATE)
	@Schema(description = "修改人")
	private String updateBy;

	/**
	 * 创建时间
	 */
	@Schema(description = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;

	/**
	 * 修改时间
	 */
	@Schema(description = "修改时间")
	@TableField(fill = FieldFill.UPDATE)
	private LocalDateTime updateTime;

pig_冷冷's avatar
pig_冷冷 已提交
89 90 91 92
	/**
	 * 删除标识(0-正常,1-删除)
	 */
	@TableLogic
93 94
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "删除标记,1:已删除,0:正常")
pig_冷冷's avatar
pig_冷冷 已提交
95
	private String delFlag;
96

pig_冷冷's avatar
pig_冷冷 已提交
97
}