Files
labplus-server/src/models/sample.js

24 lines
533 B
JavaScript
Raw Normal View History

2024-10-02 22:24:10 +08:00
import { Schema, model } from 'mongoose'
const sampleSchema = new Schema({
// L414-5KR-7-240703
// 产品名 L414-5KR
productName: { type: String },
// 批次号字符串 L414-5KR-7-240703
batchString: { type: String },
// 样品 ID 01
id: { type: String },
// 送样时间
postTime: { type: Date, default: Date.now },
// 测试项目
testItem: { type: Array, default: [] },
status: { type: Schema.Types.ObjectId, ref: 'Status' }
})
export default model('Sample', sampleSchema)