@becomes/cms
Version:
Simple CMS for building APIs.
61 lines • 1.92 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Media = exports.MediaType = void 0;
var mongoose_1 = require("mongoose");
var MediaType;
(function (MediaType) {
MediaType["DIR"] = "DIR";
MediaType["IMG"] = "IMG";
MediaType["VID"] = "VID";
MediaType["TXT"] = "TXT";
MediaType["GIF"] = "GIF";
MediaType["OTH"] = "OTH";
MediaType["PDF"] = "PDF";
MediaType["CODE"] = "CODE";
MediaType["JS"] = "JS";
MediaType["HTML"] = "HTML";
MediaType["CSS"] = "CSS";
MediaType["JAVA"] = "JAVA";
MediaType["PHP"] = "PHP";
MediaType["FONT"] = "FONT";
})(MediaType = exports.MediaType || (exports.MediaType = {}));
var Media = (function () {
function Media(_id, createdAt, updatedAt, userId, type, mimetype, size, name, path, isInRoot, childrenIds) {
this._id = _id;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
this.userId = userId;
this.type = type;
this.mimetype = mimetype;
this.size = size;
this.name = name;
this.path = path;
this.isInRoot = isInRoot;
this.childrenIds = childrenIds;
}
Object.defineProperty(Media, "schema", {
get: function () {
return new mongoose_1.Schema({
_id: mongoose_1.Types.ObjectId,
createdAt: Number,
updatedAt: Number,
userId: String,
type: String,
mimetype: String,
size: Number,
name: String,
path: String,
isInRoot: Boolean,
childrenIds: {
type: [String],
required: false,
},
});
},
enumerable: false,
configurable: true
});
return Media;
}());
exports.Media = Media;
//# sourceMappingURL=media.model.js.map