import { Rule, RuleType } from '@midwayjs/validate';
import { ApiProperty } from '@midwayjs/swagger';
import { SearchBase } from '../../frame/SearchBase';
import { dealVO } from '../../frame/VOBase';
export class FVO_news {
  constructor(data: object) {
    dealVO(this, data);
  }
  @ApiProperty({ description: '数据id' })
  id: number = undefined;
  @ApiProperty({ description: '标签' })
  'tags': Array<any> = undefined;
  @ApiProperty({ description: '标题' })
  'title': string = undefined;
  @ApiProperty({ description: '封面' })
  'logo': Array<any> = undefined;
  @ApiProperty({ description: '发布人' })
  'person': string = undefined;
  @ApiProperty({ description: '发布时间' })
  'time': string = undefined;
  @ApiProperty({ description: '内容' })
  'content': string = undefined;
  @ApiProperty({ description: '浏览次数' })
  'number': number = undefined;
  @ApiProperty({ description: '类型' })
  'type': string = undefined;
  @ApiProperty({ description: '是否使用' })
  'is_use': string = undefined;
  @ApiProperty({ description: '状态' })
  'status': string = undefined;
}

export class QDTO_news extends SearchBase {
  @ApiProperty({ description: '标题' })
  'title': string = undefined;
  @ApiProperty({ description: '标签' })
  'tags': Array<any> = undefined;
  @ApiProperty({ description: '发布人' })
  'person': string = undefined;
  @ApiProperty({ description: '发布时间' })
  'time': string = undefined;
  @ApiProperty({ description: '类型' })
  'type': string = undefined;
  @ApiProperty({ description: '是否使用' })
  'is_use': string = undefined;
  @ApiProperty({ description: '状态' })
  'status': string = undefined;
}

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

export class CDTO_news {
  @ApiProperty({ description: '标签' })
  @Rule(RuleType['array']().empty(''))
  'tags': Array<any> = undefined;
  @ApiProperty({ description: '标题' })
  @Rule(RuleType['string']().empty(''))
  'title': string = undefined;
  @ApiProperty({ description: '封面' })
  @Rule(RuleType['array']().empty(''))
  'logo': Array<any> = undefined;
  @ApiProperty({ description: '发布人' })
  @Rule(RuleType['string']().empty(''))
  'person': string = undefined;
  @ApiProperty({ description: '发布时间' })
  @Rule(RuleType['string']().empty(''))
  'time': string = undefined;
  @ApiProperty({ description: '内容' })
  @Rule(RuleType['string']().empty(''))
  'content': string = undefined;
  @ApiProperty({ description: '浏览次数' })
  @Rule(RuleType['number']().empty(''))
  'number': number = undefined;
  @ApiProperty({ description: '类型' })
  @Rule(RuleType['string']().empty(''))
  'type': string = undefined;
  @ApiProperty({ description: '是否使用' })
  @Rule(RuleType['string']().empty(''))
  'is_use': string = undefined;
  @ApiProperty({ description: '状态' })
  @Rule(RuleType['string']().empty(''))
  'status': string = undefined;
}

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

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

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