implement task controller

This commit is contained in:
João Geonizeli
2022-07-09 16:58:47 -03:00
parent 8c66fa8c85
commit 87af51d504
10 changed files with 228 additions and 19 deletions

View File

@@ -24,7 +24,10 @@ export class Task {
@Column({ type: "timestamptz", nullable: true })
finishedAt?: Date;
@ManyToOne((_type) => Project, (project) => project.tasks)
@ManyToOne((_type) => Project, (project) => project.tasks,{
onUpdate: "CASCADE",
onDelete: "CASCADE",
})
@JoinColumn()
@IsNotEmpty()
project: Project;