2020-07-30 14:23:51 +02:00
|
|
|
import pick from 'lodash/pick';
|
2020-06-19 08:43:22 +02:00
|
|
|
import {IdModel} from './id.model';
|
2020-06-22 10:22:45 +02:00
|
|
|
import {BaseModel} from './base.model';
|
2020-06-19 08:43:22 +02:00
|
|
|
|
2020-06-22 10:22:45 +02:00
|
|
|
export class MaterialModel extends BaseModel {
|
2020-06-19 08:43:22 +02:00
|
|
|
_id: IdModel = null;
|
|
|
|
name = '';
|
|
|
|
supplier = '';
|
|
|
|
group = '';
|
2020-07-22 10:45:34 +02:00
|
|
|
properties: {material_template: string, [prop: string]: string} = {material_template: null};
|
|
|
|
numbers: string[] = [''];
|
2020-08-31 16:14:47 +02:00
|
|
|
selected = false;
|
|
|
|
status = '';
|
2020-06-19 08:43:22 +02:00
|
|
|
|
|
|
|
sendFormat() {
|
2020-07-30 14:23:51 +02:00
|
|
|
return pick(this, ['name', 'supplier', 'group', 'numbers', 'properties']);
|
2020-06-19 08:43:22 +02:00
|
|
|
}
|
|
|
|
}
|