desi-mongoose
Version:
A fun and intuitive MongoDB ODM for Node.js with a Hinglish twist
20 lines (19 loc) • 448 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DesiRelation = void 0;
class DesiRelation {
static ref(modelName, options = {}) {
return {
type: 'ObjectId',
ref: modelName,
...options
};
}
static array(modelName) {
return {
type: ['ObjectId'],
ref: modelName
};
}
}
exports.DesiRelation = DesiRelation;