Spaces:
Sleeping
Sleeping
Download models/CounterModel.js from Mahmoud7456/MultiUsersSalesSystem: direct link, hf CLI and curl.
- Browser
- Download file 431 Bytes
-
https://huggingface.co/spaces/Mahmoud7456/MultiUsersSalesSystem/resolve/main/models/CounterModel.js
- Command line
-
hf download hf://spaces/Mahmoud7456/MultiUsersSalesSystem/models/CounterModel.js
-
curl -L -o CounterModel.js https://huggingface.co/spaces/Mahmoud7456/MultiUsersSalesSystem/resolve/main/models/CounterModel.js
431 Bytes
| import mongoose from "mongoose"; | |
| const counterSchema = new mongoose.Schema({ | |
| tenant: { type: mongoose.Schema.Types.ObjectId, ref: "Tenant", required: true }, | |
| branch: { type: mongoose.Schema.Types.ObjectId, ref: "Branch", required: true }, | |
| invoiceNumber: { type: Number, default: 0 }, | |
| }); | |
| counterSchema.index({ tenant: 1, branch: 1 }, { unique: true }); | |
| export default mongoose.model("Counter", counterSchema); | |