ff-admin-server/src/entity/calendarType.ts

24 lines
600 B
TypeScript

import { Column, Entity, OneToMany, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
import { calendar } from "./calendar";
@Entity()
export class calendarType {
@PrimaryColumn({ generated: "increment", type: "int" })
id: number;
@Column({ type: "varchar", length: 255 })
type: string;
@Column({ type: "boolean" }) // none specified cal dav request
nscdr: boolean;
@Column({ type: "varchar", length: 255 })
color: string;
@OneToMany(() => calendar, (c) => c.type, {
nullable: false,
onDelete: "RESTRICT",
onUpdate: "RESTRICT",
})
calendar: calendar[];
}