Added Events

This commit is contained in:
2026-01-30 14:35:01 +01:00
parent e2335fdcf7
commit 76857b8611
6 changed files with 31 additions and 13 deletions

View File

@@ -1,33 +1,45 @@
import { EventType } from "src/dto/event.dto";
import { Field, ObjectType } from "@nestjs/graphql";
import { EventType, MyEvent } from "src/dto/event.dto";
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@ObjectType()
@Entity()
export class EventEntity {
export class EventEntity implements MyEvent{
@Field()
@PrimaryGeneratedColumn()
id: number;
@Field()
@Column()
eventname: string;
@Column({ type: "date" })
@Field()
@Column({ type: "datetime", default: "1970-01-01 00:00:00" })
datum: Date;
@Field()
@Column({ type: "enum", enum: [EventType.fotos, EventType.html, EventType.markdown, EventType.link] })
type: EventType;
@Field()
@Column()
content: string;
@Field()
@Column()
minitext: string;
@Field({nullable: true})
@Column({ nullable: true })
link:string;
@Field()
@Column()
foto: string;
@Field({nullable: true})
@Column({ nullable: true })
formular: number;
}