Updated the MetaData.ts model

This commit is contained in:
Mathias Wagner 2023-08-02 19:29:17 +02:00
parent 72014cadf6
commit f77ff6f03f
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -1,4 +1,4 @@
import { Schema } from "mongoose"; import { model, Schema } from "mongoose";
export interface IMetaData { export interface IMetaData {
projectId: string, projectId: string,
@ -6,6 +6,7 @@ export interface IMetaData {
name: string, name: string,
description?: string, description?: string,
defaultValue?: string, defaultValue?: string,
public: boolean
} }
const MetaDataSchema = new Schema<IMetaData>({ const MetaDataSchema = new Schema<IMetaData>({
@ -22,7 +23,11 @@ const MetaDataSchema = new Schema<IMetaData>({
required: true required: true
}, },
description: String, description: String,
defaultValue: String defaultValue: String,
public: {
type: Boolean,
default: false
}
}); });
export const MetaData = MetaDataSchema; export const MetaData = model<IMetaData>("MetaData", MetaDataSchema);