Commit baf7755e authored by “Yevgeniy's avatar “Yevgeniy

#23 added many to oone relation in task to project

parent dcae3430
...@@ -21,6 +21,7 @@ import { ...@@ -21,6 +21,7 @@ import {
assignedTo: User[]; assignedTo: User[];
accomplish: taskFinishType; accomplish: taskFinishType;
author: User; author: User;
project:Project|null;
} }
@Entity({ name: 'Task' }) @Entity({ name: 'Task' })
...@@ -51,4 +52,7 @@ import { ...@@ -51,4 +52,7 @@ import {
@ManyToMany(() => User, (user: { tasks: Task[]; }) => user.tasks) @ManyToMany(() => User, (user: { tasks: Task[]; }) => user.tasks)
assignedTo!: User[]; assignedTo!: User[];
@ManyToOne(()=>Project,(project: Project) => task.project)
project: Project | null;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment