import { Rule, RuleType } from '@midwayjs/validate';
import { ApiProperty } from '@midwayjs/swagger';
import { dealVO } from '../../frame/VOBase';
export class FVO_role {
  constructor(data: object) {
    dealVO(this, data);
  }
  @ApiProperty({ description: '数据id' })
  id: number = undefined;
  @ApiProperty({ description: '角色名称' })
  'name': string = undefined;
  @ApiProperty({ description: '角色编码' })
  'code': string = undefined;
  @ApiProperty({ description: '目录' })
  'menu': Array<any> = undefined;
  @ApiProperty({ description: '简介' })
  'brief': string = undefined;
  @ApiProperty({ description: '是否使用' })
  'is_use': string = undefined;
  @ApiProperty({ description: '是否为默认' })
  'is_default': string = undefined;
  @ApiProperty({ description: '是否为管理员角色' })
  'is_admin_role': string = undefined;
}

export class QDTO_role {
  @ApiProperty({ description: '角色编码' })
  'code': string = undefined;
  @ApiProperty({ description: '是否使用' })
  'is_use': string = undefined;
}

export class QVO_role extends FVO_role {
  constructor(data: object) {
    super(data);
    dealVO(this, data);
  }
}

export class CDTO_role {
  @ApiProperty({ description: '角色名称' })
  @Rule(RuleType['string']().empty(''))
  'name': string = undefined;
  @ApiProperty({ description: '角色编码' })
  @Rule(RuleType['string']().empty(''))
  'code': string = undefined;
  @ApiProperty({ description: '目录' })
  @Rule(RuleType['array']().empty(''))
  'menu': Array<any> = undefined;
  @ApiProperty({ description: '简介' })
  @Rule(RuleType['string']().empty(''))
  'brief': string = undefined;
  @ApiProperty({ description: '是否为默认' })
  @Rule(RuleType['string']().empty(''))
  'is_default': string = undefined;
  @ApiProperty({ description: '是否使用' })
  @Rule(RuleType['string']().empty(''))
  'is_use': string = undefined;
  @ApiProperty({ description: '是否为管理员角色' })
  @Rule(RuleType['string']().empty(''))
  'is_admin_role': string = undefined;
}

export class CVO_role extends FVO_role {
  constructor(data: object) {
    super(data);
    dealVO(this, data);
  }
}

export class UDTO_role extends CDTO_role {
  @ApiProperty({ description: '数据id' })
  @Rule(RuleType['number']().empty(''))
  id: number = undefined;
}

export class UVAO_role extends FVO_role {
  constructor(data: object) {
    super(data);
    dealVO(this, data);
  }
}
