22 lines
538 B
TypeScript
22 lines
538 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;
|
||
|
|
||
|
@OneToMany(() => calendar, (c) => c.type, {
|
||
|
nullable: false,
|
||
|
onDelete: "RESTRICT",
|
||
|
onUpdate: "RESTRICT",
|
||
|
})
|
||
|
calendar: calendar[];
|
||
|
}
|