|
@@ -0,0 +1,110 @@
|
|
|
|
+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_channelVideo {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
|
+ _id: string = undefined;
|
|
|
|
+ @ApiProperty({ description: '展会id' })
|
|
|
|
+ 'channel_id': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '标题' })
|
|
|
|
+ 'title': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '开始时间' })
|
|
|
|
+ 'start_dete': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '结束时间' })
|
|
|
|
+ 'end_date': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '视频文件' })
|
|
|
|
+ 'video_file': Array<any> = undefined;
|
|
|
|
+ @ApiProperty({ description: '排序' })
|
|
|
|
+ 'sort': number = undefined;
|
|
|
|
+ @ApiProperty({ description: '是否使用' })
|
|
|
|
+ 'is_use': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class QDTO_channelVideo extends SearchBase {
|
|
|
|
+ constructor() {
|
|
|
|
+ const like_prop = [];
|
|
|
|
+ const props = [
|
|
|
|
+ 'channel_id',
|
|
|
|
+ 'title',
|
|
|
|
+ 'start_dete',
|
|
|
|
+ 'end_date',
|
|
|
|
+ 'sort',
|
|
|
|
+ 'is_use',
|
|
|
|
+ ];
|
|
|
|
+ const mapping = [];
|
|
|
|
+ super({ like_prop, props, mapping });
|
|
|
|
+ }
|
|
|
|
+ @ApiProperty({ description: '展会id' })
|
|
|
|
+ 'channel_id': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '标题' })
|
|
|
|
+ 'title': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '开始时间' })
|
|
|
|
+ 'start_dete': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '结束时间' })
|
|
|
|
+ 'end_date': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '排序' })
|
|
|
|
+ 'sort': number = undefined;
|
|
|
|
+ @ApiProperty({ description: '是否使用' })
|
|
|
|
+ 'is_use': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class QVO_channelVideo extends FVO_channelVideo {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class CDTO_channelVideo {
|
|
|
|
+ @ApiProperty({ description: '展会id' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'channel_id': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '标题' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'title': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '开始时间' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'start_dete': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '结束时间' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'end_date': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '视频文件' })
|
|
|
|
+ @Rule(RuleType['array']().empty(''))
|
|
|
|
+ 'video_file': Array<any> = undefined;
|
|
|
|
+ @ApiProperty({ description: '排序' })
|
|
|
|
+ @Rule(RuleType['number']().empty(''))
|
|
|
|
+ 'sort': number = undefined;
|
|
|
|
+ @ApiProperty({ description: '是否使用' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'is_use': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class CVO_channelVideo extends FVO_channelVideo {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class UDTO_channelVideo extends CDTO_channelVideo {
|
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ _id: string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class UVAO_channelVideo extends FVO_channelVideo {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|