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

25 lines
600 B
TypeScript
Raw Normal View History

2024-10-26 13:08:05 +00:00
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;
2024-10-27 10:47:13 +00:00
@Column({ type: "varchar", length: 255 })
color: string;
2024-10-26 13:08:05 +00:00
@OneToMany(() => calendar, (c) => c.type, {
nullable: false,
onDelete: "RESTRICT",
onUpdate: "RESTRICT",
})
calendar: calendar[];
}