zs 1 سال پیش
والد
کامیت
dd8c5dccf3

+ 2 - 1
src/entity/Collection.entity.ts

@@ -12,9 +12,10 @@ export class Collection extends BaseModel {
   accounting: Array<any>;
   @prop({
     required: false,
-    index: false,
+    index: true,
     zh: '是否使用',
     remark: '字典表:is_use',
+    default: '0',
   })
   is_use: string;
 }

+ 8 - 0
src/entity/Good.entity.ts

@@ -21,4 +21,12 @@ export class Good extends BaseModel {
   sell_num: number;
   @prop({ required: false, index: true, zh: '供应商id' })
   supplier_id: string;
+  @prop({
+    required: false,
+    index: true,
+    zh: '是否使用',
+    remark: '字典表:is_use',
+    default: '0',
+  })
+  is_use: string;
 }

+ 8 - 2
src/entity/Specs.entity.ts

@@ -13,8 +13,14 @@ export class Specs extends BaseModel {
   money: Decimal128;
   @prop({ required: false, index: false, zh: '库存' })
   num: number;
-  @prop({ required: false, index: true, zh: '状态' })
-  status: string;
   @prop({ required: false, index: false, zh: '图片' })
   file: Array<any>;
+  @prop({
+    required: false,
+    index: true,
+    zh: '是否使用',
+    remark: '字典表:is_use',
+    default: '0',
+  })
+  is_use: string;
 }

+ 8 - 1
src/interface/Good.interface.ts

@@ -26,12 +26,14 @@ export class FVO_Good {
   'sell_num': number = undefined;
   @ApiProperty({ description: '供应商id' })
   'supplier_id': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
 }
 
 export class QDTO_Good extends SearchBase {
   constructor() {
     const like_prop = [];
-    const props = ['name', 'type', 'supplier_id'];
+    const props = ['name', 'type', 'supplier_id', 'is_use'];
     const mapping = [];
     super({ like_prop, props, mapping });
   }
@@ -41,6 +43,8 @@ export class QDTO_Good extends SearchBase {
   'type': string = undefined;
   @ApiProperty({ description: '供应商id' })
   'supplier_id': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
 }
 
 export class QVO_Good extends FVO_Good {
@@ -69,6 +73,9 @@ export class CDTO_Good {
   @ApiProperty({ description: '供应商id' })
   @Rule(RuleType['string']().empty(''))
   'supplier_id': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+  @Rule(RuleType['string']().empty(''))
+  'is_use': string = undefined;
 }
 
 export class CVO_Good extends FVO_Good {

+ 8 - 6
src/interface/Specs.interface.ts

@@ -26,12 +26,14 @@ export class FVO_Specs {
   'status': string = undefined;
   @ApiProperty({ description: '图片' })
   'file': Array<any> = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
 }
 
 export class QDTO_Specs extends SearchBase {
   constructor() {
     const like_prop = [];
-    const props = ['goods', 'name', 'status'];
+    const props = ['goods', 'name', 'is_use'];
     const mapping = [];
     super({ like_prop, props, mapping });
   }
@@ -39,8 +41,8 @@ export class QDTO_Specs extends SearchBase {
   'goods': string = undefined;
   @ApiProperty({ description: '规格名称' })
   'name': string = undefined;
-  @ApiProperty({ description: '状态' })
-  'status': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
 }
 
 export class QVO_Specs extends FVO_Specs {
@@ -63,12 +65,12 @@ export class CDTO_Specs {
   @ApiProperty({ description: '库存' })
   @Rule(RuleType['number']().empty(''))
   'num': number = undefined;
-  @ApiProperty({ description: '状态' })
-  @Rule(RuleType['string']().empty(''))
-  'status': string = undefined;
   @ApiProperty({ description: '图片' })
   @Rule(RuleType['array']().empty(''))
   'file': Array<any> = undefined;
+  @ApiProperty({ description: '是否使用' })
+  @Rule(RuleType['string']().empty(''))
+  'is_use': string = undefined;
 }
 
 export class CVO_Specs extends FVO_Specs {