18 lines
433 B
TypeScript
18 lines
433 B
TypeScript
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
import { Document, Types } from 'mongoose';
|
|
|
|
@Schema({ timestamps: false })
|
|
export class Stock extends Document {
|
|
@Prop({ required: true })
|
|
name: string;
|
|
|
|
@Prop({ type: Types.ObjectId, ref: 'Location', required: true })
|
|
locationId: Types.ObjectId;
|
|
|
|
@Prop({ })
|
|
areas: Types.Array<string>;
|
|
|
|
}
|
|
|
|
export const StockSchema = SchemaFactory.createForClass(Stock);
|