فهرست منبع

修改维修表字段

zs 1 سال پیش
والد
کامیت
36a23f593e
2فایلهای تغییر یافته به همراه26 افزوده شده و 0 حذف شده
  1. 10 0
      src/entity/Upkeep.entity.ts
  2. 16 0
      src/interface/Upkeep.interface.ts

+ 10 - 0
src/entity/Upkeep.entity.ts

@@ -4,6 +4,8 @@ import { BaseModel } from 'free-midway-component';
   schemaOptions: { collection: 'Upkeep' },
 })
 export class Upkeep extends BaseModel {
+  @prop({ required: false, index: true, zh: '订单id' })
+  order_id: string;
   @prop({ required: true, index: true, zh: '用户id' })
   user: string;
   @prop({ required: false, index: true, zh: '用户名称' })
@@ -22,4 +24,12 @@ export class Upkeep extends BaseModel {
   spec_name: string;
   @prop({ required: false, index: false, zh: '维修地址' })
   address: string;
+  @prop({
+    required: false,
+    index: true,
+    zh: '状态',
+    remark: '字典表 :upkeep',
+    default: '0',
+  })
+  status: string;
 }

+ 16 - 0
src/interface/Upkeep.interface.ts

@@ -18,6 +18,8 @@ export class FVO_upkeep {
   }
   @ApiProperty({ description: '数据id' })
   _id: string = undefined;
+  @ApiProperty({ description: '订单id' })
+  'order_id': string = undefined;
   @ApiProperty({ description: '用户id' })
   'user': string = undefined;
   @ApiProperty({ description: '用户名称' })
@@ -36,12 +38,15 @@ export class FVO_upkeep {
   'spec_name': string = undefined;
   @ApiProperty({ description: '维修地址' })
   'address': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
 }
 
 export class QDTO_upkeep extends SearchBase {
   constructor() {
     const like_prop = [];
     const props = [
+      'order_id',
       'user',
       'user_name',
       'supplier',
@@ -50,10 +55,13 @@ export class QDTO_upkeep extends SearchBase {
       'good_name',
       'spec',
       'spec_name',
+      'status',
     ];
     const mapping = [];
     super({ like_prop, props, mapping });
   }
+  @ApiProperty({ description: '订单id' })
+  'order_id': string = undefined;
   @ApiProperty({ description: '用户id' })
   'user': string = undefined;
   @ApiProperty({ description: '用户名称' })
@@ -70,6 +78,8 @@ export class QDTO_upkeep extends SearchBase {
   'spec': string = undefined;
   @ApiProperty({ description: '规格名称' })
   'spec_name': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
 }
 
 export class QVO_upkeep extends FVO_upkeep {
@@ -80,6 +90,9 @@ export class QVO_upkeep extends FVO_upkeep {
 }
 
 export class CDTO_upkeep {
+  @ApiProperty({ description: '订单id' })
+  @Rule(RuleType['string']().empty(''))
+  'order_id': string = undefined;
   @ApiProperty({ description: '用户id' })
   @Rule(
     RuleType['string']()
@@ -123,6 +136,9 @@ export class CDTO_upkeep {
   @ApiProperty({ description: '维修地址' })
   @Rule(RuleType['string']().empty(''))
   'address': string = undefined;
+  @ApiProperty({ description: '状态' })
+  @Rule(RuleType['string']().empty(''))
+  'status': string = undefined;
 }
 
 export class CVO_upkeep extends FVO_upkeep {