Added Events
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user