|
@@ -0,0 +1,93 @@
|
|
|
+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_download {
|
|
|
+ constructor(data: object) {
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
+ _id: string = undefined;
|
|
|
+ @ApiProperty({ description: '下载进度' })
|
|
|
+ 'progress': string = undefined;
|
|
|
+ @ApiProperty({ description: '下载时间' })
|
|
|
+ 'create_time': string = undefined;
|
|
|
+ @ApiProperty({ description: '文件路径' })
|
|
|
+ 'uri': string = undefined;
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
+ 'status': string = undefined;
|
|
|
+ @ApiProperty({ description: '导出文件名称' })
|
|
|
+ 'title': string = undefined;
|
|
|
+ @ApiProperty({ description: '导出用户' })
|
|
|
+ 'user': string = undefined;
|
|
|
+ @ApiProperty({ description: '备注' })
|
|
|
+ 'remark': string = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class QDTO_download extends SearchBase {
|
|
|
+ constructor() {
|
|
|
+ const like_prop = [];
|
|
|
+ const props = ['user'];
|
|
|
+ const mapping = [];
|
|
|
+ super({ like_prop, props, mapping });
|
|
|
+ }
|
|
|
+ @ApiProperty({ description: '导出用户' })
|
|
|
+ 'user': string = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class QVO_download extends FVO_download {
|
|
|
+ constructor(data: object) {
|
|
|
+ super(data);
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export class CDTO_download {
|
|
|
+ @ApiProperty({ description: '下载进度' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'progress': string = undefined;
|
|
|
+ @ApiProperty({ description: '下载时间' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'create_time': string = undefined;
|
|
|
+ @ApiProperty({ description: '文件路径' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'uri': string = undefined;
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'status': string = undefined;
|
|
|
+ @ApiProperty({ description: '导出文件名称' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'title': string = undefined;
|
|
|
+ @ApiProperty({ description: '导出用户' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'user': string = undefined;
|
|
|
+ @ApiProperty({ description: '备注' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ 'remark': string = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class CVO_download extends FVO_download {
|
|
|
+ constructor(data: object) {
|
|
|
+ super(data);
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export class UDTO_download extends CDTO_download {
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
+ _id: string = undefined;
|
|
|
+}
|
|
|
+
|
|
|
+export class UVAO_download extends FVO_download {
|
|
|
+ constructor(data: object) {
|
|
|
+ super(data);
|
|
|
+ dealVO(this, data);
|
|
|
+ }
|
|
|
+}
|