|
@@ -0,0 +1,136 @@
|
|
|
|
+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_personal {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
|
+ _id: string = undefined;
|
|
|
|
+ @ApiProperty({ description: '用户类型' })
|
|
|
|
+ 'type': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '邀请码' })
|
|
|
|
+ 'code': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '账号' })
|
|
|
|
+ 'account': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '密码' })
|
|
|
|
+ 'password': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '姓名' })
|
|
|
|
+ 'name': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '手机号' })
|
|
|
|
+ 'phone': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '电子邮箱' })
|
|
|
|
+ 'email': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '联系地址' })
|
|
|
|
+ 'address': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '办公电话' })
|
|
|
|
+ 'work_phone': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '所属行业' })
|
|
|
|
+ 'industry': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '所属辖区' })
|
|
|
|
+ 'area': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '身份证号' })
|
|
|
|
+ 'card': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '职务职称' })
|
|
|
|
+ 'zwzc': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '所在院系' })
|
|
|
|
+ 'school': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '所学专业' })
|
|
|
|
+ 'major': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
|
+ 'status': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class QDTO_personal extends SearchBase {
|
|
|
|
+ constructor() {
|
|
|
|
+ const like_prop = [];
|
|
|
|
+ const props = [];
|
|
|
|
+ const mapping = [];
|
|
|
|
+ super({ like_prop, props, mapping });
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class QVO_personal extends FVO_personal {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class CDTO_personal {
|
|
|
|
+ @ApiProperty({ description: '用户类型' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'type': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '邀请码' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'code': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '账号' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'account': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '密码' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'password': 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(''))
|
|
|
|
+ 'email': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '联系地址' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'address': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '办公电话' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'work_phone': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '所属行业' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'industry': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '所属辖区' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'area': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '身份证号' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'card': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '职务职称' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'zwzc': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '所在院系' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'school': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '所学专业' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'major': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'status': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class CVO_personal extends FVO_personal {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class UDTO_personal extends CDTO_personal {
|
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ _id: string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class UVAO_personal extends FVO_personal {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|