You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

126 lines
3.2 KiB

import _ from "lodash";
import BaseModel from "~src/models/BaseModel";
export default class waterSample extends BaseModel {
schema = {
...this.schema,
type: {
type: this.DataTypes.STRING,
allowNull: false,
desc: `نوع نمونه`,
},
mainGroupTest: {
type: this.DataTypes.STRING,
allowNull: false,
desc: `:گروه اصلی آزمایش
1.رادیو اکتیو
2.شیمیایی
3.فیزیکی
4.کلرسنجی
5.میکروبی`,
},
subGroupTest: {
type: this.DataTypes.STRING(128),
allowNull: false,
desc: `گروه فرعی آزمایش`,
},
latinName: {
type: this.DataTypes.STRING(128),
allowNull: true,
desc: `نام لاتینِ پارامتر`,
},
name: {
type: this.DataTypes.STRING(128),
allowNull: true,
desc: `نام فارسی پارامتر`,
},
symbol: {
type: this.DataTypes.STRING(10),
allowNull: true,
desc: `علامت اختصاری`,
},
measureUnit: {
type: this.DataTypes.STRING(32),
allowNull: true,
desc: "واحد اندازه گیری",
},
paramCode: {
type: this.DataTypes.STRING(8),
allowNull: true,
desc: "کد پارامتر",
},
minValid: {
type: this.DataTypes.STRING(128),
allowNull: true,
desc: "حداقل مجاز",
},
maxValid: {
type: this.DataTypes.STRING(128),
allowNull: true,
desc: "حداکثر مجاز",
},
minOptimal: {
type: this.DataTypes.STRING(128),
allowNull: true,
desc: "حداقل مطلوب",
},
maxOptimal: {
type: this.DataTypes.STRING(128),
allowNull: true,
desc: "حداکثر مطلوب",
},
maxTransportTime: {
type: this.DataTypes.STRING,
allowNull: true,
desc: "حداکثر زمان انتقال نمونه به آزمایشگاه",
},
maxWriteInTime: {
type: this.DataTypes.STRING(8),
allowNull: true,
desc: "حداکثر زمان ثبت نتیجه نمونه برداری",
sample: `
null => در محل
30 mi => سی دقیقه
1 h => یک ساعت
1 d => یک روز
1 mo => یک ماه
1 y => یک سال
`,
},
containerProperty: {
type: this.DataTypes.STRING,
allowNull: true,
desc: "ویژگی ظرف نگهداری",
},
keepCondition: {
type: this.DataTypes.STRING,
allowNull: true,
desc: "شرایط نگهداری",
},
minSampleAmount: {
type: this.DataTypes.STRING,
allowNull: true,
desc: "حداقل حجم نمونه مورد نیاز ",
},
examinMethod: {
type: this.DataTypes.TEXT,
allowNull: true,
desc: "روش انجام آزمایش",
},
standardNum: {
type: this.DataTypes.STRING(64),
allowNull: true,
desc: "شماره استاندارد",
},
workflowId: {
type: this.DataTypes.INTEGER,
allowNull: false,
desc: "شناسه روند کار",
},
};
add = Object.keys(_.omit(this.schema, ["id", "workflowId"]));
updateList = Object.keys(_.omit(this.schema, ["id"]));
getList = this.updateList;
}