|
@@ -0,0 +1,135 @@
|
|
|
|
+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_apply {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
|
+ _id: string = undefined;
|
|
|
|
+ @ApiProperty({ description: '用户' })
|
|
|
|
+ 'user': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '公证员' })
|
|
|
|
+ 'admin': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '业务' })
|
|
|
|
+ 'business': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '材料' })
|
|
|
|
+ 'material': object = undefined;
|
|
|
|
+ @ApiProperty({ description: '类型' })
|
|
|
|
+ 'type': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '地址' })
|
|
|
|
+ 'address': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '签字' })
|
|
|
|
+ 'sign': Array<any> = undefined;
|
|
|
|
+ @ApiProperty({ description: '人脸识别' })
|
|
|
|
+ 'face': Array<any> = undefined;
|
|
|
|
+ @ApiProperty({ description: '支付信息' })
|
|
|
|
+ 'pay': object = undefined;
|
|
|
|
+ @ApiProperty({ description: '证书' })
|
|
|
|
+ 'certificate': Array<any> = undefined;
|
|
|
|
+ @ApiProperty({ description: '意见' })
|
|
|
|
+ 'opinion': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '时间' })
|
|
|
|
+ 'time': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
|
+ 'status': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+export class QDTO_apply extends SearchBase {
|
|
|
|
+ constructor() {
|
|
|
|
+ const like_prop = [];
|
|
|
|
+ const props = ['user', 'admin', 'business', 'type'];
|
|
|
|
+ const mapping = [];
|
|
|
|
+ super({ like_prop, props, mapping });
|
|
|
|
+ }
|
|
|
|
+ @ApiProperty({ description: '用户' })
|
|
|
|
+ 'user': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '公证员' })
|
|
|
|
+ 'admin': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '业务' })
|
|
|
|
+ 'business': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '类型' })
|
|
|
|
+ 'type': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+export class QVO_apply extends FVO_apply {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+export class CDTO_apply {
|
|
|
|
+ @ApiProperty({ description: '用户' })
|
|
|
|
+@Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'user': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '公证员' })
|
|
|
|
+@Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'admin': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '业务' })
|
|
|
|
+@Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'business': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '材料' })
|
|
|
|
+@Rule(RuleType['object']().empty(''))
|
|
|
|
+ 'material': object = undefined;
|
|
|
|
+ @ApiProperty({ description: '类型' })
|
|
|
|
+@Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'type': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '地址' })
|
|
|
|
+@Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'address': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '签字' })
|
|
|
|
+@Rule(RuleType['array']().empty(''))
|
|
|
|
+ 'sign': Array<any> = undefined;
|
|
|
|
+ @ApiProperty({ description: '人脸识别' })
|
|
|
|
+@Rule(RuleType['array']().empty(''))
|
|
|
|
+ 'face': Array<any> = undefined;
|
|
|
|
+ @ApiProperty({ description: '支付信息' })
|
|
|
|
+@Rule(RuleType['object']().empty(''))
|
|
|
|
+ 'pay': object = undefined;
|
|
|
|
+ @ApiProperty({ description: '证书' })
|
|
|
|
+@Rule(RuleType['array']().empty(''))
|
|
|
|
+ 'certificate': Array<any> = undefined;
|
|
|
|
+ @ApiProperty({ description: '意见' })
|
|
|
|
+@Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'opinion': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '时间' })
|
|
|
|
+@Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'time': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
|
+@Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'status': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+export class CVO_apply extends FVO_apply {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+export class UDTO_apply extends CDTO_apply {
|
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ _id: string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+export class UVAO_apply extends FVO_apply {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|