zs před 2 roky
rodič
revize
b658eaa1c6

+ 10 - 0
src/config/config.local.ts

@@ -21,6 +21,16 @@ export default {
         },
         entities: ['./entity'],
       },
+      basic: {
+        uri: `mongodb://${ip}:27017/jcyjdtglpt`,
+        options: {
+          user: 'admin',
+          pass: 'admin',
+          authSource: 'admin',
+          useNewUrlParser: true,
+        },
+        entities: ['./entity/basic'],
+      },
     },
   },
   redis: {

+ 10 - 0
src/config/config.prod.ts

@@ -21,6 +21,16 @@ export default {
         },
         entities: ['./entity'],
       },
+      basic: {
+        uri: `mongodb://${ip}:27017/jcyjdtglpt`,
+        options: {
+          user: 'admin',
+          pass: 'admin',
+          authSource: 'admin',
+          useNewUrlParser: true,
+        },
+        entities: ['./entity/basic'],
+      },
     },
   },
   redis: {

+ 0 - 89
src/controller/company.controller.ts

@@ -1,89 +0,0 @@
-import {
-  Body,
-  Controller,
-  Del,
-  Get,
-  Inject,
-  Param,
-  Post,
-  Query,
-} from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { CompanyService } from '../service/company.service';
-import {
-  CDTO_company,
-  CVO_company,
-  FVO_company,
-  QDTO_company,
-  QVO_company,
-  UDTO_company,
-  UVAO_company,
-} from '../interface/company.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['依托单位'])
-@Controller('/company')
-export class CompanyController extends BaseController {
-  @Inject()
-  service: CompanyService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_company })
-  async create(@Body() data: CDTO_company) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_company(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_company })
-  async query(
-    @Query() filter: QDTO_company,
-    @Query('skip') skip: number,
-    @Query('limit') limit: number
-  ) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_company(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_company })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_company(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_company })
-  async update(@Param('id') id: string, @Body() body: UDTO_company) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 0 - 89
src/controller/scientist.controller.ts

@@ -1,89 +0,0 @@
-import {
-  Body,
-  Controller,
-  Del,
-  Get,
-  Inject,
-  Param,
-  Post,
-  Query,
-} from '@midwayjs/decorator';
-import { BaseController } from 'free-midway-component';
-import { ScientistService } from '../service/scientist.service';
-import {
-  CDTO_scientist,
-  CVO_scientist,
-  FVO_scientist,
-  QDTO_scientist,
-  QVO_scientist,
-  UDTO_scientist,
-  UVAO_scientist,
-} from '../interface/scientist.interface';
-import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
-import { Validate } from '@midwayjs/validate';
-@ApiTags(['科学家'])
-@Controller('/scientist')
-export class ScientistController extends BaseController {
-  @Inject()
-  service: ScientistService;
-
-  @Post('/')
-  @Validate()
-  @ApiResponse({ type: CVO_scientist })
-  async create(@Body() data: CDTO_scientist) {
-    const dbData = await this.service.create(data);
-    const result = new CVO_scientist(dbData);
-    return result;
-  }
-  @Get('/')
-  @ApiQuery({ name: 'query' })
-  @ApiResponse({ type: QVO_scientist })
-  async query(
-    @Query() filter: QDTO_scientist,
-    @Query('skip') skip: number,
-    @Query('limit') limit: number
-  ) {
-    const list = await this.service.query(filter, { skip, limit });
-    const data = [];
-    for (const i of list) {
-      const newData = new QVO_scientist(i);
-      data.push(newData);
-    }
-    const total = await this.service.count(filter);
-    return { data, total };
-  }
-
-  @Get('/:id')
-  @ApiResponse({ type: FVO_scientist })
-  async fetch(@Param('id') id: string) {
-    const data = await this.service.fetch(id);
-    const result = new FVO_scientist(data);
-    return result;
-  }
-
-  @Post('/:id')
-  @Validate()
-  @ApiResponse({ type: UVAO_scientist })
-  async update(@Param('id') id: string, @Body() body: UDTO_scientist) {
-    const result = await this.service.updateOne(id, body);
-    return result;
-  }
-
-  @Del('/:id')
-  @Validate()
-  async delete(@Param('id') id: string) {
-    await this.service.delete(id);
-    return 'ok';
-  }
-  async createMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async updateMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-
-  async deleteMany(...args: any[]) {
-    throw new Error('Method not implemented.');
-  }
-}

+ 37 - 0
src/entity/basic/unitStudioApply.entity.ts

@@ -0,0 +1,37 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'unitStudioApply' },
+})
+export class UnitStudioApply extends BaseModel {
+  @prop({ required: false, index: true, zh: '单位全称' })
+  company: string;
+  @prop({ required: false, index: false, zh: '单位地址' })
+  address: string;
+  @prop({ required: false, index: false, zh: '单位法人姓名' })
+  name: string;
+  @prop({ required: false, index: true, zh: '单位法人手机号码' })
+  phone: string;
+  @prop({ required: false, index: false, zh: '法人身份证' })
+  card: Array<any>;
+  @prop({ required: false, index: false, zh: '单位联系人' })
+  unit_contact: string;
+  @prop({ required: false, index: false, zh: '单位联系电话' })
+  unit_phone: object;
+  @prop({ required: false, index: false, zh: '单位电子邮箱' })
+  unit_email: object;
+  @prop({ required: false, index: false, zh: '行业领域' })
+  fields: Array<any>;
+  @prop({ required: false, index: false, zh: '技术需求方向' })
+  direction: Array<any>;
+  @prop({ required: false, index: false, zh: '上一年度财务审计报告' })
+  audit_report: Array<any>;
+  @prop({ required: false, index: false, zh: '上一年度R&D投入专项' })
+  special_report: Array<any>;
+  @prop({ required: false, index: false, zh: '其他证明资料' })
+  prove_file: Array<any>;
+  @prop({ required: false, index: true, zh: '状态' })
+  status: string;
+  @prop({ required: false, index: true, zh: '账号id' })
+  unit_id: string;
+}

+ 60 - 0
src/entity/basic/userStudioApply.entity.ts

@@ -0,0 +1,60 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'userStudioApply' },
+})
+export class UserStudioApply extends BaseModel {
+  @prop({ required: false, index: true, zh: '姓名' })
+  name: string;
+  @prop({ required: false, index: true, zh: '出生年月' })
+  brith: string;
+  @prop({ required: false, index: true, zh: '居住地' })
+  live_place: string;
+  @prop({ required: false, index: true, zh: '手机号' })
+  phone: object;
+  @prop({ required: false, index: true, zh: '电子邮箱' })
+  email: object;
+  @prop({ required: false, index: false, zh: '上传身份证照片' })
+  card: Array<any>;
+  @prop({ required: false, index: true, zh: '团队联系人' })
+  team_name: string;
+  @prop({ required: false, index: true, zh: '团队联系电话' })
+  team_phone: object;
+  @prop({ required: false, index: true, zh: '所在单位全称' })
+  company: string;
+  @prop({ required: false, index: true, zh: '所在单位地址' })
+  address: string;
+  @prop({ required: false, index: true, zh: '专业技术职称' })
+  zc: string;
+  @prop({ required: false, index: false, zh: '职称证明' })
+  zc_file: Array<any>;
+  @prop({ required: false, index: true, zh: '社会兼职' })
+  part_job: string;
+  @prop({ required: false, index: false, zh: '研究领域' })
+  fields: Array<any>;
+  @prop({ required: false, index: false, zh: '研究方向' })
+  direction: Array<any>;
+  @prop({ required: false, index: false, zh: '服务企业代表性案例' })
+  case: Array<any>;
+  @prop({ required: false, index: false, zh: '案例证明材料' })
+  case_file: Array<any>;
+  @prop({
+    required: false,
+    index: true,
+    zh: '是否为在职人员',
+    remark: '字典:studio_scientist_is_job',
+  })
+  is_job: string;
+  @prop({ required: false, index: false, zh: '单位同意入驻证明' })
+  settle_file: Array<any>;
+  @prop({ required: false, index: false, zh: '上传退休证明' })
+  job_zc_file: Array<any>;
+  @prop({ required: false, index: true, zh: '状态', default: '0' })
+  status: string;
+  @prop({ required: false, index: true, zh: '账号id' })
+  user_id: string;
+  @prop({ required: false, index: true, zh: '学历' })
+  education: string;
+  @prop({ required: false, index: true, zh: '学位' })
+  degree: string;
+}

+ 0 - 35
src/entity/company.entity.ts

@@ -1,35 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'company' },
-})
-export class Company extends BaseModel {
-  @prop({ required: false, index: true, zh: '登陆账号' })
-  account: string;
-  @prop({ required: false, index: true, zh: '登录密码' })
-  password: string;
-  @prop({ required: false, index: true, zh: '负责人姓名' })
-  name: string;
-  @prop({ required: false, index: true, zh: '负责人手机号码' })
-  phone: string;
-  @prop({ required: false, index: true, zh: '负责人邮箱' })
-  email: string;
-  @prop({ required: false, index: true, zh: '单位全称' })
-  company: string;
-  @prop({ required: false, index: true, zh: '单位地址' })
-  address: string;
-  @prop({ required: false, index: false, zh: '上传负责人委任证明' })
-  appoint_file: Array<any>;
-  @prop({
-    required: false,
-    index: true,
-    zh: '用户状态',
-    remark: '字典表:company_status',
-    default: '0',
-  })
-  status: string;
-  @prop({ required: false, index: false, zh: '记录' })
-  record: Array<any>;
-  @prop({ required: false, index: true, zh: '角色', remark: '角色表:role' })
-  role_id: string;
-}

+ 0 - 55
src/entity/scientist.entity.ts

@@ -1,55 +0,0 @@
-import { modelOptions, prop } from '@typegoose/typegoose';
-import { BaseModel } from 'free-midway-component';
-@modelOptions({
-  schemaOptions: { collection: 'scientist' },
-})
-export class Scientist extends BaseModel {
-  @prop({ required: false, index: true, zh: '登陆账号' })
-  account: string;
-  @prop({ required: false, index: true, zh: '登陆密码' })
-  password: string;
-  @prop({ required: false, index: true, zh: '姓名' })
-  name: string;
-  @prop({ required: false, index: true, zh: '常用手机号码' })
-  phone: string;
-  @prop({ required: false, index: true, zh: '邮箱' })
-  email: string;
-  @prop({ required: false, index: false, zh: '上传身份证照片' })
-  card: Array<any>;
-  @prop({ required: false, index: true, zh: '所在单位全称' })
-  company: string;
-  @prop({ required: false, index: true, zh: '所在单位地址' })
-  address: string;
-  @prop({ required: false, index: true, zh: '专业技术职称' })
-  zc: string;
-  @prop({ required: false, index: false, zh: '职称证明' })
-  zc_file: Array<any>;
-  @prop({ required: false, index: false, zh: '单位同意入驻证明' })
-  settle_file: Array<any>;
-  @prop({
-    required: false,
-    index: true,
-    zh: '用户状态',
-    remark: '字典表:scientist_status',
-    default: '0',
-  })
-  status: string;
-  @prop({ required: false, index: false, zh: '记录' })
-  record: Array<any>;
-  @prop({ required: false, index: true, zh: '角色', remark: '角色表:role' })
-  role_id: string;
-  @prop({
-    required: false,
-    index: false,
-    zh: '是否为在职人员',
-    remark: '字典表:scientist_is_job',
-    default: '0',
-  })
-  is_job: string;
-  @prop({ required: false, index: false, zh: '退休前所在单位' })
-  job_company: string;
-  @prop({ required: false, index: false, zh: '上传退休证明材料' })
-  job_file: Array<any>;
-  @prop({ required: false, index: false, zh: '上传职称证明' })
-  job_zc_file: Array<any>;
-}

+ 0 - 139
src/interface/company.interface.ts

@@ -1,139 +0,0 @@
-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_company {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '登陆账号' })
-  'account': string = undefined;
-  @ApiProperty({ description: '登录密码' })
-  'password': string = undefined;
-  @ApiProperty({ description: '负责人姓名' })
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人手机号码' })
-  'phone': string = undefined;
-  @ApiProperty({ description: '负责人邮箱' })
-  'email': string = undefined;
-  @ApiProperty({ description: '单位全称' })
-  'company': string = undefined;
-  @ApiProperty({ description: '单位地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '上传负责人委任证明' })
-  'appoint_file': Array<any> = undefined;
-  @ApiProperty({ description: '用户状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '记录' })
-  'record': Array<any> = undefined;
-  @ApiProperty({ description: '角色' })
-  'role_id': string = undefined;
-}
-
-export class QDTO_company extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = [
-      'account',
-      'password',
-      'name',
-      'phone',
-      'email',
-      'company',
-      'address',
-      'status',
-      'role_id',
-    ];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '登陆账号' })
-  'account': string = undefined;
-  @ApiProperty({ description: '登录密码' })
-  'password': string = undefined;
-  @ApiProperty({ description: '负责人姓名' })
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人手机号码' })
-  'phone': string = undefined;
-  @ApiProperty({ description: '负责人邮箱' })
-  'email': string = undefined;
-  @ApiProperty({ description: '单位全称' })
-  'company': string = undefined;
-  @ApiProperty({ description: '单位地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '用户状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '角色' })
-  'role_id': string = undefined;
-}
-
-export class QVO_company extends FVO_company {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_company {
-  @ApiProperty({ description: '登陆账号' })
-  @Rule(RuleType['string']().empty(''))
-  'account': string = undefined;
-  @ApiProperty({ description: '登录密码' })
-  @Rule(RuleType['string']().empty(''))
-  'password': string = undefined;
-  @ApiProperty({ description: '负责人姓名' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '负责人手机号码' })
-  @Rule(RuleType['string']().empty(''))
-  'phone': string = undefined;
-  @ApiProperty({ description: '负责人邮箱' })
-  @Rule(RuleType['string']().empty(''))
-  'email': string = undefined;
-  @ApiProperty({ description: '单位全称' })
-  @Rule(RuleType['string']().empty(''))
-  'company': string = undefined;
-  @ApiProperty({ description: '单位地址' })
-  @Rule(RuleType['string']().empty(''))
-  'address': string = undefined;
-  @ApiProperty({ description: '上传负责人委任证明' })
-  @Rule(RuleType['array']().empty(''))
-  'appoint_file': Array<any> = undefined;
-  @ApiProperty({ description: '用户状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-  @ApiProperty({ description: '记录' })
-  @Rule(RuleType['array']().empty(''))
-  'record': Array<any> = undefined;
-  @ApiProperty({ description: '角色' })
-  @Rule(RuleType['string']().empty(''))
-  'role_id': string = undefined;
-}
-
-export class CVO_company extends FVO_company {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_company extends CDTO_company {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_company extends FVO_company {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 177
src/interface/scientist.interface.ts

@@ -1,177 +0,0 @@
-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_scientist {
-  constructor(data: object) {
-    dealVO(this, data);
-  }
-  @ApiProperty({ description: '数据id' })
-  _id: string = undefined;
-  @ApiProperty({ description: '登陆账号' })
-  'account': string = undefined;
-  @ApiProperty({ description: '登陆密码' })
-  'password': string = undefined;
-  @ApiProperty({ description: '姓名' })
-  'name': string = undefined;
-  @ApiProperty({ description: '常用手机号码' })
-  'phone': string = undefined;
-  @ApiProperty({ description: '邮箱' })
-  'email': string = undefined;
-  @ApiProperty({ description: '上传身份证照片' })
-  'card': Array<any> = undefined;
-  @ApiProperty({ description: '所在单位全称' })
-  'company': string = undefined;
-  @ApiProperty({ description: '所在单位地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '专业技术职称' })
-  'zc': string = undefined;
-  @ApiProperty({ description: '职称证明' })
-  'zc_file': Array<any> = undefined;
-  @ApiProperty({ description: '单位同意入驻证明' })
-  'settle_file': Array<any> = undefined;
-  @ApiProperty({ description: '用户状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '记录' })
-  'record': Array<any> = undefined;
-  @ApiProperty({ description: '角色' })
-  'role_id': string = undefined;
-  @ApiProperty({ description: '是否为在职人员' })
-  'is_job': string = undefined;
-  @ApiProperty({ description: '退休前所在单位' })
-  'job_company': string = undefined;
-  @ApiProperty({ description: '上传退休证明材料' })
-  'job_file': Array<any> = undefined;
-  @ApiProperty({ description: '上传职称证明' })
-  'job_zc_file': Array<any> = undefined;
-}
-
-export class QDTO_scientist extends SearchBase {
-  constructor() {
-    const like_prop = [];
-    const props = [
-      'account',
-      'password',
-      'name',
-      'phone',
-      'email',
-      'company',
-      'address',
-      'zc',
-      'status',
-      'role_id',
-    ];
-    const mapping = [];
-    super({ like_prop, props, mapping });
-  }
-  @ApiProperty({ description: '登陆账号' })
-  'account': string = undefined;
-  @ApiProperty({ description: '登陆密码' })
-  'password': string = undefined;
-  @ApiProperty({ description: '姓名' })
-  'name': string = undefined;
-  @ApiProperty({ description: '常用手机号码' })
-  'phone': string = undefined;
-  @ApiProperty({ description: '邮箱' })
-  'email': string = undefined;
-  @ApiProperty({ description: '所在单位全称' })
-  'company': string = undefined;
-  @ApiProperty({ description: '所在单位地址' })
-  'address': string = undefined;
-  @ApiProperty({ description: '专业技术职称' })
-  'zc': string = undefined;
-  @ApiProperty({ description: '用户状态' })
-  'status': string = undefined;
-  @ApiProperty({ description: '角色' })
-  'role_id': string = undefined;
-}
-
-export class QVO_scientist extends FVO_scientist {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class CDTO_scientist {
-  @ApiProperty({ description: '登陆账号' })
-  @Rule(RuleType['string']().empty(''))
-  'account': string = undefined;
-  @ApiProperty({ description: '登陆密码' })
-  @Rule(RuleType['string']().empty(''))
-  'password': string = undefined;
-  @ApiProperty({ description: '姓名' })
-  @Rule(RuleType['string']().empty(''))
-  'name': string = undefined;
-  @ApiProperty({ description: '常用手机号码' })
-  @Rule(RuleType['string']().empty(''))
-  'phone': string = undefined;
-  @ApiProperty({ description: '邮箱' })
-  @Rule(RuleType['string']().empty(''))
-  'email': string = undefined;
-  @ApiProperty({ description: '上传身份证照片' })
-  @Rule(RuleType['array']().empty(''))
-  'card': Array<any> = undefined;
-  @ApiProperty({ description: '所在单位全称' })
-  @Rule(RuleType['string']().empty(''))
-  'company': string = undefined;
-  @ApiProperty({ description: '所在单位地址' })
-  @Rule(RuleType['string']().empty(''))
-  'address': string = undefined;
-  @ApiProperty({ description: '专业技术职称' })
-  @Rule(RuleType['string']().empty(''))
-  'zc': string = undefined;
-  @ApiProperty({ description: '职称证明' })
-  @Rule(RuleType['array']().empty(''))
-  'zc_file': Array<any> = undefined;
-  @ApiProperty({ description: '单位同意入驻证明' })
-  @Rule(RuleType['array']().empty(''))
-  'settle_file': Array<any> = undefined;
-  @ApiProperty({ description: '用户状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
-  @ApiProperty({ description: '记录' })
-  @Rule(RuleType['array']().empty(''))
-  'record': Array<any> = undefined;
-  @ApiProperty({ description: '角色' })
-  @Rule(RuleType['string']().empty(''))
-  'role_id': string = undefined;
-  @ApiProperty({ description: '是否为在职人员' })
-  @Rule(RuleType['string']().empty(''))
-  'is_job': string = undefined;
-  @ApiProperty({ description: '退休前所在单位' })
-  @Rule(RuleType['string']().empty(''))
-  'job_company': string = undefined;
-  @ApiProperty({ description: '上传退休证明材料' })
-  @Rule(RuleType['array']().empty(''))
-  'job_file': Array<any> = undefined;
-  @ApiProperty({ description: '上传职称证明' })
-  @Rule(RuleType['array']().empty(''))
-  'job_zc_file': Array<any> = undefined;
-}
-
-export class CVO_scientist extends FVO_scientist {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}
-
-export class UDTO_scientist extends CDTO_scientist {
-  @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
-  _id: string = undefined;
-}
-
-export class UVAO_scientist extends FVO_scientist {
-  constructor(data: object) {
-    super(data);
-    dealVO(this, data);
-  }
-}

+ 0 - 11
src/service/company.service.ts

@@ -1,11 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Company } from '../entity/company.entity';
-type modelType = ReturnModelType<typeof Company>;
-@Provide()
-export class CompanyService extends BaseService<modelType> {
-  @InjectEntityModel(Company)
-  model: modelType;
-}

+ 9 - 8
src/service/message.service.ts

@@ -3,8 +3,8 @@ import { InjectEntityModel } from '@midwayjs/typegoose';
 import { getModelForClass, ReturnModelType } from '@typegoose/typegoose';
 import { BaseService } from 'free-midway-component';
 import { Message } from '../entity/message.entity';
-import { Company } from '../entity/company.entity';
-import { Scientist } from '../entity/scientist.entity';
+import { UnitStudioApply } from '../entity/basic/unitStudioApply.entity';
+import { UserStudioApply } from '../entity/basic/userStudioApply.entity';
 import _ = require('lodash');
 type modelType = ReturnModelType<typeof Message>;
 @Provide()
@@ -13,18 +13,19 @@ export class MessageService extends BaseService<modelType> {
     super();
     if (!this.ctx && ctx) {
       this.ctx = ctx;
-      if (!this.cModel) this.cModel = getModelForClass(Company);
-      if (!this.sModel) this.sModel = getModelForClass(Scientist);
+      if (!this.cModel) this.cModel = getModelForClass(UnitStudioApply);
+      if (!this.sModel) this.sModel = getModelForClass(UserStudioApply);
       if (!this.model) this.model = getModelForClass(Message);
     }
   }
   @InjectEntityModel(Message)
   model: modelType;
 
-  @InjectEntityModel(Company)
-  cModel: ReturnModelType<typeof Company>;
-  @InjectEntityModel(Scientist)
-  sModel: ReturnModelType<typeof Scientist>;
+  @InjectEntityModel(UnitStudioApply)
+  cModel: ReturnModelType<typeof UnitStudioApply>;
+
+  @InjectEntityModel(UserStudioApply)
+  sModel: ReturnModelType<typeof UserStudioApply>;
 
   async create(body) {
     if (body.type !== '3') {

+ 0 - 11
src/service/scientist.service.ts

@@ -1,11 +0,0 @@
-import { Provide } from '@midwayjs/decorator';
-import { InjectEntityModel } from '@midwayjs/typegoose';
-import { ReturnModelType } from '@typegoose/typegoose';
-import { BaseService } from 'free-midway-component';
-import { Scientist } from '../entity/scientist.entity';
-type modelType = ReturnModelType<typeof Scientist>;
-@Provide()
-export class ScientistService extends BaseService<modelType> {
-  @InjectEntityModel(Scientist)
-  model: modelType;
-}