zs 1 rok temu
rodzic
commit
a77ed75da1

+ 4 - 4
src/interface/admin.interface.ts

@@ -44,13 +44,13 @@ export class QVO_admin extends FVO_admin {
 
 export class CDTO_admin {
   @ApiProperty({ description: '账号' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'account': string = undefined;
   @ApiProperty({ description: '密码' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'password': string = undefined;
   @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'name': string = undefined;
 }
 
@@ -63,7 +63,7 @@ export class CVO_admin extends FVO_admin {
 
 export class UDTO_admin extends CDTO_admin {
   @ApiProperty({ description: '数据id' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   _id: string = undefined;
 }
 

+ 9 - 9
src/interface/application.interface.ts

@@ -77,31 +77,31 @@ export class QVO_application extends FVO_application {
 
 export class CDTO_application {
   @ApiProperty({ description: '报名的比赛id' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'match_id': string = undefined;
   @ApiProperty({ description: '报名比赛名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'match_name': string = undefined;
   @ApiProperty({ description: '团队id' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'team_id': string = undefined;
   @ApiProperty({ description: '团队名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'team_name': string = undefined;
   @ApiProperty({ description: '参赛人数' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'num': string = undefined;
   @ApiProperty({ description: '比赛成员id' })
-  @Rule(RuleType['array']().empty(''))
+  @Rule(RuleType['array']().allow('', null))
   'user_id': Array<any> = undefined;
   @ApiProperty({ description: '报名时间' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'apply_time': string = undefined;
   @ApiProperty({ description: '分数' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'score': string = undefined;
   @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'status': string = undefined;
 }
 

+ 3 - 3
src/interface/config.interface.ts

@@ -40,13 +40,13 @@ export class QVO_config extends FVO_config {
 
 export class CDTO_config {
   @ApiProperty({ description: 'logo' })
-  @Rule(RuleType['array']().empty(''))
+  @Rule(RuleType['array']().allow('', null))
   'logo_url': Array<any> = undefined;
   @ApiProperty({ description: 'logo长图' })
-  @Rule(RuleType['array']().empty(''))
+  @Rule(RuleType['array']().allow('', null))
   'longlogo_url': Array<any> = undefined;
   @ApiProperty({ description: '管理员二维码' })
-  @Rule(RuleType['array']().empty(''))
+  @Rule(RuleType['array']().allow('', null))
   'admin_url': Array<any> = undefined;
 }
 

+ 13 - 13
src/interface/course.interface.ts

@@ -91,43 +91,43 @@ export class QVO_course extends FVO_course {
 
 export class CDTO_course {
   @ApiProperty({ description: '比赛id' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'match_id': string = undefined;
   @ApiProperty({ description: '比赛名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'match_name': string = undefined;
   @ApiProperty({ description: '红方团队id' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'red_team_id': string = undefined;
   @ApiProperty({ description: '红方团队名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'red_team_name': string = undefined;
   @ApiProperty({ description: '红方' })
-  @Rule(RuleType['array']().empty(''))
+  @Rule(RuleType['array']().allow('', null))
   'red_person': Array<any> = undefined;
   @ApiProperty({ description: '红方分数' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'red_score': string = undefined;
   @ApiProperty({ description: '蓝方团队id' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'blue_team_id': string = undefined;
   @ApiProperty({ description: '蓝方团队名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'blue_team_name': string = undefined;
   @ApiProperty({ description: '蓝方' })
-  @Rule(RuleType['array']().empty(''))
+  @Rule(RuleType['array']().allow('', null))
   'blue_person': Array<any> = undefined;
   @ApiProperty({ description: '蓝方分数' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'blue_score': string = undefined;
   @ApiProperty({ description: '比赛时间' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'match_time': string = undefined;
   @ApiProperty({ description: '胜者' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'winner': string = undefined;
   @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'status': string = undefined;
 }
 

+ 6 - 6
src/interface/dictData.interface.ts

@@ -56,22 +56,22 @@ export class QVO_dictData extends FVO_dictData {
 
 export class CDTO_dictData {
   @ApiProperty({ description: '类型' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'type': string = undefined;
   @ApiProperty({ description: '标签' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'label': string = undefined;
   @ApiProperty({ description: '键值' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'value': string = undefined;
   @ApiProperty({ description: '排序' })
-  @Rule(RuleType['number']().empty(''))
+  @Rule(RuleType['number']().allow('', null))
   'sort': number = undefined;
   @ApiProperty({ description: '是否使用' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'is_use': string = undefined;
   @ApiProperty({ description: '字数据' })
-  @Rule(RuleType['array']().empty(''))
+  @Rule(RuleType['array']().allow('', null))
   'children': Array<any> = undefined;
 }
 

+ 4 - 4
src/interface/dictType.interface.ts

@@ -48,16 +48,16 @@ export class QVO_dictType extends FVO_dictType {
 
 export class CDTO_dictType {
   @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'title': string = undefined;
   @ApiProperty({ description: '类型' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'type': string = undefined;
   @ApiProperty({ description: '备注' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'remark': string = undefined;
   @ApiProperty({ description: '是否使用' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'is_use': string = undefined;
 }
 

+ 7 - 7
src/interface/match.interface.ts

@@ -56,25 +56,25 @@ export class QVO_match extends FVO_match {
 
 export class CDTO_match {
   @ApiProperty({ description: '比赛名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'name': string = undefined;
   @ApiProperty({ description: '开始时间' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'start_time': string = undefined;
   @ApiProperty({ description: '结束时间' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'end_time': string = undefined;
   @ApiProperty({ description: '比赛地点' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'address': string = undefined;
   @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'status': string = undefined;
   @ApiProperty({ description: '报名截止时间' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'sign_deadline': string = undefined;
   @ApiProperty({ description: '比赛信息' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'information': string = undefined;
 }
 

+ 9 - 9
src/interface/team.interface.ts

@@ -71,31 +71,31 @@ export class QVO_team extends FVO_team {
 
 export class CDTO_team {
   @ApiProperty({ description: '所属管理员' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'administrator': string = undefined;
   @ApiProperty({ description: '团队名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'name': string = undefined;
   @ApiProperty({ description: '成立时间' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'create_time': string = undefined;
   @ApiProperty({ description: '单位地址' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'address': string = undefined;
   @ApiProperty({ description: '手机号' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'phone': string = undefined;
   @ApiProperty({ description: '团队logo' })
-  @Rule(RuleType['array']().empty(''))
+  @Rule(RuleType['array']().allow('', null))
   'logo': Array<any> = undefined;
   @ApiProperty({ description: '团队人数' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'number': string = undefined;
   @ApiProperty({ description: '团队成员' })
-  @Rule(RuleType['array']().empty(''))
+  @Rule(RuleType['array']().allow('', null))
   'member': Array<any> = undefined;
   @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'status': string = undefined;
 }
 

+ 6 - 6
src/interface/teamApply.interface.ts

@@ -56,22 +56,22 @@ export class QVO_teamApply extends FVO_teamApply {
 
 export class CDTO_teamApply {
   @ApiProperty({ description: '团队id' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'team_id': string = undefined;
   @ApiProperty({ description: '团队名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'team_name': string = undefined;
   @ApiProperty({ description: '申请人id' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'apply_id': string = undefined;
   @ApiProperty({ description: '申请人名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'apply_name': string = undefined;
   @ApiProperty({ description: '申请时间' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'apply_time': string = undefined;
   @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'status': string = undefined;
 }
 

+ 12 - 12
src/interface/user.interface.ts

@@ -80,40 +80,40 @@ export class QVO_user extends FVO_user {
 
 export class CDTO_user {
   @ApiProperty({ description: 'openid' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'openid': string = undefined;
   @ApiProperty({ description: '类别' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'type': string = undefined;
   @ApiProperty({ description: '名称' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'name': string = undefined;
   @ApiProperty({ description: '账号' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'account': string = undefined;
   @ApiProperty({ description: '密码' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'password': string = undefined;
   @ApiProperty({ description: '手机号' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'phone': string = undefined;
   @ApiProperty({ description: '邮箱' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'email': string = undefined;
   @ApiProperty({ description: '性别' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'gender': string = undefined;
   @ApiProperty({ description: '头像' })
-  @Rule(RuleType['array']().empty(''))
+  @Rule(RuleType['array']().allow('', null))
   'icon': Array<any> = undefined;
   @ApiProperty({ description: '年龄' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'age': string = undefined;
   @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'status': string = undefined;
   @ApiProperty({ description: '工作单位' })
-  @Rule(RuleType['string']().empty(''))
+  @Rule(RuleType['string']().allow('', null))
   'work': string = undefined;
 }