|
@@ -0,0 +1,123 @@
|
|
|
|
+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_investment {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
|
+ _id: string = undefined;
|
|
|
|
+ @ApiProperty({ description: '平台用户id' })
|
|
|
|
+ 'user': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人姓名' })
|
|
|
|
+ 'name': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人证件类型' })
|
|
|
|
+ 'cardType': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人证件号码' })
|
|
|
|
+ 'card': string = undefined;
|
|
|
|
+ @ApiProperty({ description: ' 投资人出资额' })
|
|
|
|
+ 'money': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人出资方式' })
|
|
|
|
+ 'type': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人的住所地' })
|
|
|
|
+ 'address': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人的联系方式' })
|
|
|
|
+ 'phone': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '简介' })
|
|
|
|
+ 'brief': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '是否公开' })
|
|
|
|
+ 'is_show': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
|
+ 'status': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class QDTO_investment extends SearchBase {
|
|
|
|
+ constructor() {
|
|
|
|
+ const like_prop = [];
|
|
|
|
+ const props = ['user', 'name', 'type', 'brief', 'is_show', 'status'];
|
|
|
|
+ const mapping = [];
|
|
|
|
+ super({ like_prop, props, mapping });
|
|
|
|
+ }
|
|
|
|
+ @ApiProperty({ description: '平台用户id' })
|
|
|
|
+ 'user': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人姓名' })
|
|
|
|
+ 'name': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人出资方式' })
|
|
|
|
+ 'type': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '简介' })
|
|
|
|
+ 'brief': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '是否公开' })
|
|
|
|
+ 'is_show': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
|
+ 'status': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class QVO_investment extends FVO_investment {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class CDTO_investment {
|
|
|
|
+ @ApiProperty({ description: '平台用户id' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'user': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人姓名' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'name': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人证件类型' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'cardType': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人证件号码' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'card': string = undefined;
|
|
|
|
+ @ApiProperty({ description: ' 投资人出资额' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'money': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人出资方式' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'type': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人的住所地' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'address': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '投资人的联系方式' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'phone': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '简介' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'brief': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '是否公开' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'is_show': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'status': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class CVO_investment extends FVO_investment {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class UDTO_investment extends CDTO_investment {
|
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ _id: string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class UVAO_investment extends FVO_investment {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|