Files
Exchange/server/db/getPrice.ts
2025-11-07 22:24:40 +01:00

25 lines
544 B
TypeScript
Executable File

import { ObjectID } from 'mongodb'
import * as mongoose from 'mongoose'
const getPrice = new mongoose.Schema({
currency: {
type:ObjectID,
required: true
},
userId : {
type: mongoose.ObjectId,
required: true
},
quantity: {
type:Number,
required: true
},
rialPricePerUnit: {
type:Number,
default: 0
},
createdAt: { type: Date, expires: 20, default: Date.now }
},{ timestamp: true })
export const GetPrice = mongoose.model('getPrice', getPrice)