123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- 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_studio {
- constructor(data: object) {
- dealVO(this, data);
- }
- @ApiProperty({ description: '数据id' })
- _id: string = undefined;
- @ApiProperty({ description: '绑定用户' })
- 'user_id': string = undefined;
- @ApiProperty({ description: '依托单位id' })
- 'company_id': string = undefined;
- @ApiProperty({ description: '依托单位名称' })
- 'company_name': string = undefined;
- @ApiProperty({ description: '专业领域' })
- 'zy_fields': Array<any> = undefined;
- @ApiProperty({ description: '申报日期' })
- 'apply_time': string = undefined;
- @ApiProperty({ description: '工作室名称(申报)' })
- 'apply_name': string = undefined;
- @ApiProperty({ description: '工作室名称(正式)' })
- 'name': string = undefined;
- @ApiProperty({ description: '科学家绑定用户' })
- 'scientist_id': string = undefined;
- @ApiProperty({ description: '科学家信息' })
- 'scientistinfo_id': string = undefined;
- @ApiProperty({ description: '科学家姓名' })
- 'scientist_name': string = undefined;
- @ApiProperty({ description: '合作领域' })
- 'hz_fields': Array<any> = undefined;
- @ApiProperty({ description: '合作方向' })
- 'hz_direction': Array<any> = undefined;
- @ApiProperty({ description: '入驻协议' })
- 'settle_file': Array<any> = undefined;
- @ApiProperty({ description: '科学家所在单位同意入驻证明材料' })
- 'unit_settle_file': Array<any> = undefined;
- @ApiProperty({ description: '建设方案' })
- 'build_file': Array<any> = undefined;
- @ApiProperty({ description: '状态' })
- 'status': string = undefined;
- @ApiProperty({ description: '记录' })
- 'record': Array<any> = undefined;
- }
- export class QDTO_studio extends SearchBase {
- constructor() {
- const like_prop = [];
- const props = ['user_id', 'company_id', 'company_name', 'apply_time', 'apply_name', 'name', 'scientist_id', 'scientistinfo_id', 'scientist_name', 'status'];
- const mapping = [];
- super({ like_prop, props, mapping });
- }
- @ApiProperty({ description: '绑定用户' })
- 'user_id': string = undefined;
- @ApiProperty({ description: '依托单位id' })
- 'company_id': string = undefined;
- @ApiProperty({ description: '依托单位名称' })
- 'company_name': string = undefined;
- @ApiProperty({ description: '申报日期' })
- 'apply_time': string = undefined;
- @ApiProperty({ description: '工作室名称(申报)' })
- 'apply_name': string = undefined;
- @ApiProperty({ description: '工作室名称(正式)' })
- 'name': string = undefined;
- @ApiProperty({ description: '科学家绑定用户' })
- 'scientist_id': string = undefined;
- @ApiProperty({ description: '科学家信息' })
- 'scientistinfo_id': string = undefined;
- @ApiProperty({ description: '科学家姓名' })
- 'scientist_name': string = undefined;
- @ApiProperty({ description: '状态' })
- 'status': string = undefined;
- }
- export class QVO_studio extends FVO_studio {
- constructor(data: object) {
- super(data);
- dealVO(this, data);
- }
- }
- export class CDTO_studio {
- @ApiProperty({ description: '绑定用户' })
- @Rule(RuleType['string']().empty(''))
- 'user_id': string = undefined;
- @ApiProperty({ description: '依托单位id' })
- @Rule(RuleType['string']().empty(''))
- 'company_id': string = undefined;
- @ApiProperty({ description: '依托单位名称' })
- @Rule(RuleType['string']().empty(''))
- 'company_name': string = undefined;
- @ApiProperty({ description: '专业领域' })
- @Rule(RuleType['array']().empty(''))
- 'zy_fields': Array<any> = undefined;
- @ApiProperty({ description: '申报日期' })
- @Rule(RuleType['string']().empty(''))
- 'apply_time': string = undefined;
- @ApiProperty({ description: '工作室名称(申报)' })
- @Rule(RuleType['string']().empty(''))
- 'apply_name': string = undefined;
- @ApiProperty({ description: '工作室名称(正式)' })
- @Rule(RuleType['string']().empty(''))
- 'name': string = undefined;
- @ApiProperty({ description: '科学家绑定用户' })
- @Rule(RuleType['string']().empty(''))
- 'scientist_id': string = undefined;
- @ApiProperty({ description: '科学家信息' })
- @Rule(RuleType['string']().empty(''))
- 'scientistinfo_id': string = undefined;
- @ApiProperty({ description: '科学家姓名' })
- @Rule(RuleType['string']().empty(''))
- 'scientist_name': string = undefined;
- @ApiProperty({ description: '合作领域' })
- @Rule(RuleType['array']().empty(''))
- 'hz_fields': Array<any> = undefined;
- @ApiProperty({ description: '合作方向' })
- @Rule(RuleType['array']().empty(''))
- 'hz_direction': Array<any> = undefined;
- @ApiProperty({ description: '入驻协议' })
- @Rule(RuleType['array']().empty(''))
- 'settle_file': Array<any> = undefined;
- @ApiProperty({ description: '科学家所在单位同意入驻证明材料' })
- @Rule(RuleType['array']().empty(''))
- 'unit_settle_file': Array<any> = undefined;
- @ApiProperty({ description: '建设方案' })
- @Rule(RuleType['array']().empty(''))
- 'build_file': Array<any> = undefined;
- @ApiProperty({ description: '状态' })
- @Rule(RuleType['string']().empty(''))
- 'status': string = undefined;
- @ApiProperty({ description: '记录' })
- @Rule(RuleType['array']().empty(''))
- 'record': Array<any> = undefined;
- }
- export class CVO_studio extends FVO_studio {
- constructor(data: object) {
- super(data);
- dealVO(this, data);
- }
- }
- export class UDTO_studio extends CDTO_studio {
- @ApiProperty({ description: '数据id' })
- @Rule(RuleType['string']().empty(''))
- _id: string = undefined;
- }
- export class UVAO_studio extends FVO_studio {
- constructor(data: object) {
- super(data);
- dealVO(this, data);
- }
- }
|