Files
repo-home/apps/backend/src/inventory/_entities/stock.entity.ts
T

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);