Spaces:
Runtime error
Runtime error
Download src/models/Vendor.js from yeshwanth-kr/dss-server: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/spaces/yeshwanth-kr/dss-server/resolve/main/src/models/Vendor.js
- Command line
-
hf download hf://spaces/yeshwanth-kr/dss-server/src/models/Vendor.js
-
curl -L -o Vendor.js https://huggingface.co/spaces/yeshwanth-kr/dss-server/resolve/main/src/models/Vendor.js
1.06 kB
| const { mongoose, baseSchemaOptions } = require('./base'); | |
| const VendorSchema = new mongoose.Schema({ | |
| name: { type: String, required: true, trim: true }, | |
| pan: { type: String, trim: true, default: null }, | |
| gstin: { type: String, trim: true, default: null }, | |
| vendor_code: { type: String, required: true, trim: true }, | |
| epf_code: { type: String, trim: true, default: null }, | |
| esi_code: { type: String, trim: true, default: null }, | |
| work_order_no: { type: String, trim: true, default: null }, | |
| contract_start: { type: Date, default: null }, | |
| contract_end: { type: Date, default: null }, | |
| max_workers: { type: Number, default: null }, | |
| form1_path: { type: String, default: null }, | |
| form2_path: { type: String, default: null }, | |
| is_active: { type: Boolean, default: true } | |
| }, baseSchemaOptions()); | |
| VendorSchema.index({ vendor_code: 1 }, { unique: true }); | |
| VendorSchema.index({ pan: 1 }, { unique: true, sparse: true }); | |
| VendorSchema.index({ gstin: 1 }, { unique: true, sparse: true }); | |
| module.exports = mongoose.model('Vendor', VendorSchema); | |