GitLab wurde erfolgreich aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Danke für Ihre Geduld.

Commit df106e28 authored by Philipp Sautner's avatar Philipp Sautner


parent 7bd96109
export enum MessageOfTheDayModelType {
import { getModelForClass, prop, Severity } from '@typegoose/typegoose';
import { IsArray, IsEnum, IsString } from 'class-validator';
import DbDAO from '../db/DbDAO';
import { DbCollection } from '../enums/DbOperation';
import { MessageOfTheDayModelType } from '../enums/MessageOfTheDayModelType';
export class MessageOfTheDayModelItem {
enum: MessageOfTheDayModelType,
}) //
@IsEnum(MessageOfTheDayModelType) //
public type: MessageOfTheDayModelType;
@prop({ type: String }) //
@IsString() //
public header: string;
@prop({ type: String}) //
@IsString() //
public content: string;
@prop({ type: Date}) //
@IsArray() //
public expiryDate: Date;
export const MessageOfTheDayModel = getModelForClass(MessageOfTheDayModelItem, {
schemaOptions: {
collection: DbCollection.History,
timestamps: true,
existingConnection: DbDAO.dbCon,
options: {
runSyncIndexes: true,
allowMixed: Severity.ALLOW,
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment