|
@@ -1,76 +0,0 @@
|
|
|
-import { Rule, RuleType } from '@midwayjs/validate';
|
|
|
-import { ApiProperty } from '@midwayjs/swagger';
|
|
|
-import { SearchBase } from 'free-midway-component';
|
|
|
-import get = require('lodash/get');
|
|
|
-const dealVO = (cla, data) => {
|
|
|
- for (const key in cla) {
|
|
|
- const val = get(data, key);
|
|
|
- if (val || val === 0) cla[key] = val;
|
|
|
- }
|
|
|
-};
|
|
|
-export class FVO_Supplier {
|
|
|
- constructor(data: object) {
|
|
|
- dealVO(this, data);
|
|
|
- }
|
|
|
- @ApiProperty({ description: '数据id' })
|
|
|
- _id: string = undefined;
|
|
|
- @ApiProperty({ description: '供应商名称' })
|
|
|
- 'name': string = undefined;
|
|
|
- @ApiProperty({ description: '联系电话' })
|
|
|
- 'tel': string = undefined;
|
|
|
- @ApiProperty({ description: '负责人' })
|
|
|
- 'head': string = undefined;
|
|
|
- @ApiProperty({ description: '负责人电话' })
|
|
|
- 'head_tel': string = undefined;
|
|
|
-}
|
|
|
-
|
|
|
-export class QDTO_Supplier extends SearchBase {
|
|
|
- constructor() {
|
|
|
- const like_prop = [];
|
|
|
- const props = [];
|
|
|
- const mapping = [];
|
|
|
- super({ like_prop, props, mapping });
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export class QVO_Supplier extends FVO_Supplier {
|
|
|
- constructor(data: object) {
|
|
|
- super(data);
|
|
|
- dealVO(this, data);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export class CDTO_Supplier {
|
|
|
- @ApiProperty({ description: '供应商名称' })
|
|
|
- @Rule(RuleType['string']().empty(''))
|
|
|
- 'name': string = undefined;
|
|
|
- @ApiProperty({ description: '联系电话' })
|
|
|
- @Rule(RuleType['string']().empty(''))
|
|
|
- 'tel': string = undefined;
|
|
|
- @ApiProperty({ description: '负责人' })
|
|
|
- @Rule(RuleType['string']().empty(''))
|
|
|
- 'head': string = undefined;
|
|
|
- @ApiProperty({ description: '负责人电话' })
|
|
|
- @Rule(RuleType['string']().empty(''))
|
|
|
- 'head_tel': string = undefined;
|
|
|
-}
|
|
|
-
|
|
|
-export class CVO_Supplier extends FVO_Supplier {
|
|
|
- constructor(data: object) {
|
|
|
- super(data);
|
|
|
- dealVO(this, data);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export class UDTO_Supplier extends CDTO_Supplier {
|
|
|
- @ApiProperty({ description: '数据id' })
|
|
|
- @Rule(RuleType['string']().empty(''))
|
|
|
- _id: string = undefined;
|
|
|
-}
|
|
|
-
|
|
|
-export class UVAO_Supplier extends FVO_Supplier {
|
|
|
- constructor(data: object) {
|
|
|
- super(data);
|
|
|
- dealVO(this, data);
|
|
|
- }
|
|
|
-}
|