123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- import { Rule, RuleType } from '@midwayjs/validate';
- import { ApiProperty } from '@midwayjs/swagger';
- import { SearchBase } from 'free-midway-component';
- import get = require('lodash/get');
- const dealVO = (cla, data) => {
- for (const key in cla) {
- const val = get(data, key);
- if (val || val === 0) cla[key] = val;
- }
- };
- export class FVO_teamApply {
- constructor(data: object) {
- dealVO(this, data);
- }
- @ApiProperty({ description: '数据id' })
- _id: string = undefined;
- @ApiProperty({ description: '团队id' })
- 'team_id': string = undefined;
- @ApiProperty({ description: '团队名称' })
- 'team_name': string = undefined;
- @ApiProperty({ description: '申请人id' })
- 'apply_id': string = undefined;
- @ApiProperty({ description: '申请人名称' })
- 'apply_name': string = undefined;
- @ApiProperty({ description: '申请时间' })
- 'apply_time': string = undefined;
- @ApiProperty({ description: '状态' })
- 'status': string = undefined;
- }
- export class QDTO_teamApply extends SearchBase {
- constructor() {
- const like_prop = ['team_name'];
- const props = ['team_id', 'team_name', 'apply_id', 'apply_name', 'status'];
- const mapping = [];
- super({ like_prop, props, mapping });
- }
- @ApiProperty({ description: '团队id' })
- 'team_id': string = undefined;
- @ApiProperty({ description: '团队名称' })
- 'team_name': string = undefined;
- @ApiProperty({ description: '申请人id' })
- 'apply_id': string = undefined;
- @ApiProperty({ description: '申请人名称' })
- 'apply_name': string = undefined;
- @ApiProperty({ description: '状态' })
- 'status': string = undefined;
- }
- export class QVO_teamApply extends FVO_teamApply {
- constructor(data: object) {
- super(data);
- dealVO(this, data);
- }
- }
- export class CDTO_teamApply {
- @ApiProperty({ description: '团队id' })
- @Rule(RuleType['string']().allow('', null))
- 'team_id': string = undefined;
- @ApiProperty({ description: '团队名称' })
- @Rule(RuleType['string']().allow('', null))
- 'team_name': string = undefined;
- @ApiProperty({ description: '申请人id' })
- @Rule(RuleType['string']().allow('', null))
- 'apply_id': string = undefined;
- @ApiProperty({ description: '申请人名称' })
- @Rule(RuleType['string']().allow('', null))
- 'apply_name': string = undefined;
- @ApiProperty({ description: '申请时间' })
- @Rule(RuleType['string']().allow('', null))
- 'apply_time': string = undefined;
- @ApiProperty({ description: '状态' })
- @Rule(RuleType['string']().allow('', null))
- 'status': string = undefined;
- }
- export class CVO_teamApply extends FVO_teamApply {
- constructor(data: object) {
- super(data);
- dealVO(this, data);
- }
- }
- export class UDTO_teamApply extends CDTO_teamApply {
- @ApiProperty({ description: '数据id' })
- @Rule(RuleType['string']().empty(''))
- _id: string = undefined;
- }
- export class UVAO_teamApply extends FVO_teamApply {
- constructor(data: object) {
- super(data);
- dealVO(this, data);
- }
- }
|