calendar fixes
This commit is contained in:
parent
136da08b70
commit
8c597fd68d
8 changed files with 70 additions and 27 deletions
|
@ -1,18 +1,23 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
ManyToOne,
|
||||
PrimaryColumn,
|
||||
PrimaryGeneratedColumn,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
} from "typeorm";
|
||||
import { calendarType } from "./calendarType";
|
||||
|
||||
@Entity()
|
||||
export class calendar {
|
||||
@PrimaryGeneratedColumn("increment")
|
||||
id: number;
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({ type: "date", nullable: false })
|
||||
date: Date;
|
||||
|
||||
@Column({ type: "timestamp", nullable: true })
|
||||
@Column({ type: "datetime", nullable: false })
|
||||
starttime: Date;
|
||||
|
||||
@Column({ type: "datetime", nullable: true })
|
||||
@Column({ type: "datetime", nullable: false })
|
||||
endtime: Date;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: false })
|
||||
|
@ -21,6 +26,18 @@ export class calendar {
|
|||
@Column({ type: "text", nullable: true })
|
||||
content: string;
|
||||
|
||||
@Column({ type: "text", nullable: true })
|
||||
location: string;
|
||||
|
||||
@Column({ type: "boolean", default: false })
|
||||
allDay: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt: Date;
|
||||
|
||||
@ManyToOne(() => calendarType, (t) => t.calendar, {
|
||||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue