master
2022-03-23 5e5e26e0a7ed334f46fbb8f343ba2cdea299a024
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { EntityModel } from '@midwayjs/orm';
import { BaseEntity } from '@cool-midway/core';
import { Column, Index } from 'typeorm';
 
/**
 * 角色
 */
@EntityModel('t_sys_role')
export class BaseSysRoleEntity extends BaseEntity {
  @Column({ comment: '用户ID' })
  userId: string;
 
  @Index({ unique: true })
  @Column({ comment: '名称' })
  name: string;
 
  @Index({ unique: true })
  @Column({ comment: '角色标签', nullable: true, length: 50 })
  label: string;
 
  @Column({ comment: '备注', nullable: true })
  remark: string;
 
  @Column({ comment: '数据权限是否关联上下级', default: 1 })
  relevance: number;
}