Files
Schema-Studio/src/BaseModel/model/basemodel.ts
2025-08-01 18:11:54 +05:30

28 lines
724 B
TypeScript

import { Schema, Document } from "mongoose";
import MainModel from "../connection/connection";
export interface IBase extends Document {
BaseName: string;
createdBy: string;
description: string;
members: [string];
useableLanguage: string;
typeOfDB: string;
DBName: string;
architecture: string;
}
const baseSchema: Schema = new Schema({
BaseName: { type: String },
createdBy: { type: String },
description: { type: String },
DBName: { type: String },
typeOfDB: { type: String },
useableLanguage: { type: String },
architecture: { type: String },
members: { type: [String] },
});
const baseType = (db: any) => {
return MainModel(db, "Base", baseSchema, "Base");
};
export default baseType;