|
@@ -0,0 +1,107 @@
|
|
|
+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_sign {
|
|
|
+ constructor(data: object) {
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
+ _id: string = undefined;
|
|
|
+ @ApiProperty({ description: '平台用户id' })
|
|
|
+ 'user': string = undefined;
|
|
|
+ @ApiProperty({ description: '赛事id' })
|
|
|
+ 'match': string = undefined;
|
|
|
+ @ApiProperty({ description: '姓名' })
|
|
|
+ 'name': string = undefined;
|
|
|
+ @ApiProperty({ description: '电话号' })
|
|
|
+ 'phone': string = undefined;
|
|
|
+ @ApiProperty({ description: '证件类型' })
|
|
|
+ 'cardType': string = undefined;
|
|
|
+ @ApiProperty({ description: '证件号码' })
|
|
|
+ 'card': string = undefined;
|
|
|
+ @ApiProperty({ description: '微信/QQ' })
|
|
|
+ 'communication': string = undefined;
|
|
|
+ @ApiProperty({ description: '电子邮箱' })
|
|
|
+ 'email': string = undefined;
|
|
|
+ @ApiProperty({ description: '备注' })
|
|
|
+ 'remark': string = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class QDTO_sign extends SearchBase {
|
|
|
+ constructor() {
|
|
|
+ const like_prop = [];
|
|
|
+ const props = ['user', 'match', 'name'];
|
|
|
+ const mapping = [];
|
|
|
+ super({ like_prop, props, mapping });
|
|
|
+ }
|
|
|
+ @ApiProperty({ description: '平台用户id' })
|
|
|
+ 'user': string = undefined;
|
|
|
+ @ApiProperty({ description: '赛事id' })
|
|
|
+ 'match': string = undefined;
|
|
|
+ @ApiProperty({ description: '姓名' })
|
|
|
+ 'name': string = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class QVO_sign extends FVO_sign {
|
|
|
+ constructor(data: object) {
|
|
|
+ super(data);
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export class CDTO_sign {
|
|
|
+ @ApiProperty({ description: '平台用户id' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'user': string = undefined;
|
|
|
+ @ApiProperty({ description: '赛事id' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'match': string = undefined;
|
|
|
+ @ApiProperty({ description: '姓名' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'name': string = undefined;
|
|
|
+ @ApiProperty({ description: '电话号' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'phone': string = undefined;
|
|
|
+ @ApiProperty({ description: '证件类型' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'cardType': string = undefined;
|
|
|
+ @ApiProperty({ description: '证件号码' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'card': string = undefined;
|
|
|
+ @ApiProperty({ description: '微信/QQ' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'communication': string = undefined;
|
|
|
+ @ApiProperty({ description: '电子邮箱' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'email': string = undefined;
|
|
|
+ @ApiProperty({ description: '备注' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'remark': string = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class CVO_sign extends FVO_sign {
|
|
|
+ constructor(data: object) {
|
|
|
+ super(data);
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export class UDTO_sign extends CDTO_sign {
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ _id: string = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class UVAO_sign extends FVO_sign {
|
|
|
+ constructor(data: object) {
|
|
|
+ super(data);
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+}
|