summaryrefslogtreecommitdiff
path: root/src/models/product/product.schema.ts
blob: d44dcb7bb4de685a20b7ed74e4e57e3a50ccaab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { Document, Schema, Types } from 'mongoose';

export interface ProductSchema extends Document {
  name: string;
  description: string;
  group: string;
  price: number;
  quantity: number;
  specs: any;
}

export const productSchema = new Schema({
  name: String,
  description: String,
  group: String,
  price: Number,
  quantity: Number,
  specs: Object
}, { timestamps: true });