UNPKG

cloud-ide-model-schema

Version:

Pachage for schema management of Cloud IDEsys LMS

107 lines (106 loc) 2.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CUser = void 0; var mongoose_1 = require("mongoose"); /* SCHEMA START */ var auth_user_mst = new mongoose_1.Schema({ user_id_ent: { type: String, comment: "Unique Entity id" }, user_username: { type: String, minlength: 8, maxlength: 20, required: true, trim: true, unique: true, comment: "Unique User Name", message: "Unique User Name" }, user_firstname: { type: String, minlength: 3, maxlength: 20 }, user_middlename: { type: String, minlength: 3, maxlength: 20 }, user_lastname: { type: String, minlength: 8, maxlength: 20 }, user_fullname: { type: String, minlength: 8, maxlength: 52 }, user_emailid: { type: String, minlength: 8, maxlength: 50, trim: true, unique: true, comment: "Unique Email ID", message: "Unique Email ID" }, user_mobileno: { type: Number, minlength: 10, maxlength: 15, trim: true, unique: true, comment: "Unique Mobile no", message: "Unique Mobile no" }, user_password: { type: String, maxlength: 250, trim: true }, user_activefrom: { type: Date, comment: "User Effective from- Default is created date" }, user_activeupto: { type: Date, comment: "User Valid upto registered academic year default" }, user_photo_id_fm: { type: String, comment: "photo file manager id", trim: true }, user_passwordchangeonlogin: { type: Boolean, comment: "Change password on Login. Flag can be set by the Admin/ Reset option", default: true }, user_id_role: { type: String, comment: "Role Id associated with the user.", trim: true }, user_id_desg: { type: String, comment: "Users Designation", trim: true }, user_id_dept: { type: String, comment: "Users Department", trim: true }, user_permissions: { type: Array, default: [] }, user_isactive: { type: Boolean } }, { collection: 'auth_user_mst' }); var CUser = mongoose_1.default.model('auth_user_mst', auth_user_mst); exports.CUser = CUser;