zs 1 year ago
parent
commit
fbeeef17f5
2 changed files with 10 additions and 1 deletions
  1. 2 0
      src/entity/system/user.entity.ts
  2. 8 1
      src/interface/system/user.interface.ts

+ 2 - 0
src/entity/system/user.entity.ts

@@ -27,6 +27,8 @@ export class User extends BaseModel {
   gender: string;
   @prop({ required: false, index: true, zh: '手机号' })
   phone: string;
+  @prop({ required: false, index: true, zh: '电子邮箱' })
+  email: string;
   @prop({ required: false, index: false, zh: '角色' })
   role: Array<any>;
   @prop({ required: false, index: true, zh: '状态', default: '1' })

+ 8 - 1
src/interface/system/user.interface.ts

@@ -24,6 +24,8 @@ export class FVO_user {
   'gender': string = undefined;
   @ApiProperty({ description: '手机号' })
   'phone': string = undefined;
+  @ApiProperty({ description: '电子邮箱' })
+  'email': string = undefined;
   @ApiProperty({ description: '角色' })
   'role': Array<any> = undefined;
   @ApiProperty({ description: '状态' })
@@ -33,7 +35,7 @@ export class FVO_user {
 export class QDTO_user extends SearchBase {
   constructor() {
     const like_prop = [];
-    const props = ['account', 'nick_name', 'phone', 'status'];
+    const props = ['account', 'nick_name', 'email', 'phone', 'status'];
     const mapping = [];
     super({ like_prop, props, mapping });
   }
@@ -43,6 +45,8 @@ export class QDTO_user extends SearchBase {
   'nick_name': string = undefined;
   @ApiProperty({ description: '手机号' })
   'phone': string = undefined;
+  @ApiProperty({ description: '电子邮箱' })
+  'email': string = undefined;
   @ApiProperty({ description: '状态' })
   'status': string = undefined;
 }
@@ -70,6 +74,9 @@ export class CDTO_user {
   @ApiProperty({ description: '手机号' })
   @Rule(RuleType['string']().empty(''))
   'phone': string = undefined;
+  @ApiProperty({ description: '电子邮箱' })
+  @Rule(RuleType['string']().empty(''))
+  'email': string = undefined;
   @ApiProperty({ description: '角色' })
   @Rule(RuleType['array']().empty(''))
   'role': Array<any> = undefined;