Browse Source

修改字段

zs 1 year ago
parent
commit
77ac2106a7
2 changed files with 15 additions and 6 deletions
  1. 3 1
      src/entity/users/expert.entity.ts
  2. 12 5
      src/interface/users/expert.interface.ts

+ 3 - 1
src/entity/users/expert.entity.ts

@@ -20,10 +20,12 @@ export class Expert extends BaseModel {
   type: string;
   @prop({ required: false, index: true, zh: '学历' })
   education: string;
+  @prop({ required: false, index: true, zh: '职称' })
+  title: string;
   @prop({ required: false, index: false, zh: '简介' })
   brief: string;
   @prop({ required: false, index: true, zh: '所在地区' })
-  region: string;
+  area: Array<any>;
   @prop({ required: false, index: true, zh: '是否公开' })
   is_show: string;
   @prop({ required: false, index: true, zh: '状态', default: '0' })

+ 12 - 5
src/interface/users/expert.interface.ts

@@ -30,10 +30,12 @@ export class FVO_expert {
   'type': string = undefined;
   @ApiProperty({ description: '学历' })
   'education': string = undefined;
+  @ApiProperty({ description: '职称' })
+  'title': string = undefined;
   @ApiProperty({ description: '简介' })
   'brief': string = undefined;
   @ApiProperty({ description: '所在地区' })
-  'region': string = undefined;
+  'area': Array<any> = undefined;
   @ApiProperty({ description: '是否公开' })
   'is_show': string = undefined;
   @ApiProperty({ description: '状态' })
@@ -43,7 +45,7 @@ export class FVO_expert {
 export class QDTO_expert extends SearchBase {
   constructor() {
     const like_prop = [];
-    const props = ['user', 'name', 'gender', 'phone', 'field', 'type', 'education', 'region', 'is_show', 'status'];
+    const props = ['user', 'name', 'gender', 'phone', 'field', 'type', 'education', 'title', 'area', 'is_show', 'status'];
     const mapping = [];
     super({ like_prop, props, mapping });
   }
@@ -61,8 +63,10 @@ export class QDTO_expert extends SearchBase {
   'type': string = undefined;
   @ApiProperty({ description: '学历' })
   'education': string = undefined;
+  @ApiProperty({ description: '职称' })
+  'title': string = undefined;
   @ApiProperty({ description: '所在地区' })
-  'region': string = undefined;
+  'area': Array<any> = undefined;
   @ApiProperty({ description: '是否公开' })
   'is_show': string = undefined;
   @ApiProperty({ description: '状态' })
@@ -101,12 +105,15 @@ export class CDTO_expert {
   @ApiProperty({ description: '学历' })
   @Rule(RuleType['string']().empty(''))
   'education': string = undefined;
+  @ApiProperty({ description: '职称' })
+  @Rule(RuleType['string']().empty(''))
+  'title': string = undefined;
   @ApiProperty({ description: '简介' })
   @Rule(RuleType['string']().empty(''))
   'brief': string = undefined;
   @ApiProperty({ description: '所在地区' })
-  @Rule(RuleType['string']().empty(''))
-  'region': string = undefined;
+  @Rule(RuleType['array']().empty(''))
+  'area': Array<any> = undefined;
   @ApiProperty({ description: '是否公开' })
   @Rule(RuleType['string']().empty(''))
   'is_show': string = undefined;