|
@@ -28,8 +28,10 @@ export class FVO_User {
|
|
|
'gender': number = undefined;
|
|
|
@ApiProperty({ description: '角色' })
|
|
|
'role': string = undefined;
|
|
|
- @ApiProperty({ description: '所属' })
|
|
|
- 'belong': string = undefined;
|
|
|
+ @ApiProperty({ description: '所属街道' })
|
|
|
+ 'street': string = undefined;
|
|
|
+ @ApiProperty({ description: '所属社区' })
|
|
|
+ 'community': string = undefined;
|
|
|
@ApiProperty({ description: '微信id' })
|
|
|
'openid': string = undefined;
|
|
|
@ApiProperty({ description: '状态' })
|
|
@@ -39,12 +41,28 @@ export class FVO_User {
|
|
|
export class QDTO_User extends SearchBase {
|
|
|
constructor() {
|
|
|
const like_prop = [];
|
|
|
- const props = ['name', 'openid', 'status'];
|
|
|
+ const props = [
|
|
|
+ 'name',
|
|
|
+ 'tel',
|
|
|
+ 'gender',
|
|
|
+ 'role',
|
|
|
+ 'street',
|
|
|
+ 'openid',
|
|
|
+ 'status',
|
|
|
+ ];
|
|
|
const mapping = [];
|
|
|
super({ like_prop, props, mapping });
|
|
|
}
|
|
|
@ApiProperty({ description: '姓名' })
|
|
|
'name': string = undefined;
|
|
|
+ @ApiProperty({ description: '联系电话' })
|
|
|
+ 'tel': string = undefined;
|
|
|
+ @ApiProperty({ description: '性别' })
|
|
|
+ 'gender': number = undefined;
|
|
|
+ @ApiProperty({ description: '角色' })
|
|
|
+ 'role': string = undefined;
|
|
|
+ @ApiProperty({ description: '所属街道' })
|
|
|
+ 'street': string = undefined;
|
|
|
@ApiProperty({ description: '微信id' })
|
|
|
'openid': string = undefined;
|
|
|
@ApiProperty({ description: '状态' })
|
|
@@ -77,19 +95,38 @@ export class CDTO_User {
|
|
|
@Rule(RuleType['string']().empty(''))
|
|
|
'password': string = undefined;
|
|
|
@ApiProperty({ description: '性别' })
|
|
|
- @Rule(RuleType['number']().empty(''))
|
|
|
+ @Rule(
|
|
|
+ RuleType['number']()
|
|
|
+ .required()
|
|
|
+ .error(new ServiceError('缺少性别', FrameworkErrorEnum.NEED_BODY))
|
|
|
+ )
|
|
|
'gender': number = undefined;
|
|
|
@ApiProperty({ description: '角色' })
|
|
|
- @Rule(RuleType['string']().empty(''))
|
|
|
+ @Rule(
|
|
|
+ RuleType['string']()
|
|
|
+ .required()
|
|
|
+ .error(new ServiceError('缺少角色', FrameworkErrorEnum.NEED_BODY))
|
|
|
+ )
|
|
|
'role': string = undefined;
|
|
|
- @ApiProperty({ description: '所属' })
|
|
|
+ @ApiProperty({ description: '所属街道' })
|
|
|
@Rule(RuleType['string']().empty(''))
|
|
|
- 'belong': string = undefined;
|
|
|
- @ApiProperty({ description: '微信id' })
|
|
|
+ 'street': string = undefined;
|
|
|
+ @ApiProperty({ description: '所属社区' })
|
|
|
@Rule(RuleType['string']().empty(''))
|
|
|
+ 'community': string = undefined;
|
|
|
+ @ApiProperty({ description: '微信id' })
|
|
|
+ @Rule(
|
|
|
+ RuleType['string']()
|
|
|
+ .required()
|
|
|
+ .error(new ServiceError('缺少微信id', FrameworkErrorEnum.NEED_BODY))
|
|
|
+ )
|
|
|
'openid': string = undefined;
|
|
|
@ApiProperty({ description: '状态' })
|
|
|
- @Rule(RuleType['string']().empty(''))
|
|
|
+ @Rule(
|
|
|
+ RuleType['string']()
|
|
|
+ .required()
|
|
|
+ .error(new ServiceError('缺少状态', FrameworkErrorEnum.NEED_BODY))
|
|
|
+ )
|
|
|
'status': string = undefined;
|
|
|
}
|
|
|
|
|
@@ -119,8 +156,6 @@ export class LoginVO {
|
|
|
this[key] = get(data, key);
|
|
|
}
|
|
|
}
|
|
|
- @ApiProperty({ description: '数据id' })
|
|
|
- _id: string = undefined;
|
|
|
@ApiProperty({ description: '姓名' })
|
|
|
'name': string = undefined;
|
|
|
@ApiProperty({ description: '联系电话' })
|
|
@@ -129,8 +164,10 @@ export class LoginVO {
|
|
|
'gender': number = undefined;
|
|
|
@ApiProperty({ description: '角色' })
|
|
|
'role': string = undefined;
|
|
|
- @ApiProperty({ description: '所属' })
|
|
|
- 'belong': string = undefined;
|
|
|
+ @ApiProperty({ description: '所属街道' })
|
|
|
+ 'street': string = undefined;
|
|
|
+ @ApiProperty({ description: '所属社区' })
|
|
|
+ 'community': string = undefined;
|
|
|
@ApiProperty({ description: '微信id' })
|
|
|
'openid': string = undefined;
|
|
|
@ApiProperty({ description: '状态' })
|