|
@@ -0,0 +1,121 @@
|
|
|
|
+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_examinee {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
|
+ _id: string = undefined;
|
|
|
|
+ @ApiProperty({ description: '姓名' })
|
|
|
|
+ 'name': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '准考证号' })
|
|
|
|
+ 'exam_num': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考点编号' })
|
|
|
|
+ 'testsite_num': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '性别' })
|
|
|
|
+ 'gender': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '联系电话' })
|
|
|
|
+ 'phone': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考试日期' })
|
|
|
|
+ 'exam_date': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考试时间' })
|
|
|
|
+ 'exam_time': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考试地址' })
|
|
|
|
+ 'exam_addr': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '座位号' })
|
|
|
|
+ 'seat_num': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考试等级' })
|
|
|
|
+ 'exam_grade': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考试类型' })
|
|
|
|
+ 'exam_type': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '缴费状况' })
|
|
|
|
+ 'is_money': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
|
+ 'status': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class QDTO_examinee extends SearchBase {
|
|
|
|
+ constructor() {
|
|
|
|
+ const like_prop = [];
|
|
|
|
+ const props = [];
|
|
|
|
+ const mapping = [];
|
|
|
|
+ super({ like_prop, props, mapping });
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class QVO_examinee extends FVO_examinee {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class CDTO_examinee {
|
|
|
|
+ @ApiProperty({ description: '姓名' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'name': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '准考证号' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'exam_num': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考点编号' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'testsite_num': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '性别' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'gender': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '联系电话' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'phone': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考试日期' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'exam_date': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考试时间' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'exam_time': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考试地址' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'exam_addr': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '座位号' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'seat_num': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考试等级' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'exam_grade': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '考试类型' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'exam_type': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '缴费状况' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'is_money': string = undefined;
|
|
|
|
+ @ApiProperty({ description: '状态' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ 'status': string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class CVO_examinee extends FVO_examinee {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class UDTO_examinee extends CDTO_examinee {
|
|
|
|
+ @ApiProperty({ description: '数据id' })
|
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
|
+ _id: string = undefined;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class UVAO_examinee extends FVO_examinee {
|
|
|
|
+ constructor(data: object) {
|
|
|
|
+ super(data);
|
|
|
|
+ dealVO(this, data);
|
|
|
|
+ }
|
|
|
|
+}
|