diff --git a/src/models/MetaData.ts b/src/models/MetaData.ts new file mode 100644 index 0000000..09122ad --- /dev/null +++ b/src/models/MetaData.ts @@ -0,0 +1,42 @@ +import { model, Schema } from "mongoose"; + +export enum ILicenseMetaType { + TEXT = "TEXT", + NUMBER = "NUMBER", + BOOLEAN = "BOOLEAN" +} + +export interface IMetaData { + projectId: string, + type: ILicenseMetaType, + name: string, + description?: string, + defaultValue?: string, + public: boolean +} + +const MetaDataSchema = new Schema({ + projectId: { + type: String, + required: true + }, + type: { + type: String, + required: true + }, + name: { + type: String, + required: true + }, + description: { + type: String, + required: true + }, + defaultValue: String, + public: { + type: Boolean, + default: false + } +}); + +export const MetaData = model("meta", MetaDataSchema); \ No newline at end of file