Commit 8ccdf527 authored by “Yevgeniy's avatar “Yevgeniy

#23 added many to oone relation in task fix

parent baf7755e
......@@ -8,6 +8,7 @@ import {
ManyToMany
} from 'typeorm';
import {User} from './User';
import {Project} from './Project';
type taskFinishType = "open" | "done" |"failed";
......@@ -38,7 +39,6 @@ import {
// dateTimeStart!: Date | null;
// @CreateDateColumn({ name: 'dateTimeDue', type: Date,nullable: true })
// dateTimeDue!: Date | null;
@Column({
type: "enum",
enum: ["opened", "done" , "failed"],
......@@ -53,6 +53,6 @@ import {
@ManyToMany(() => User, (user: { tasks: Task[]; }) => user.tasks)
assignedTo!: User[];
@ManyToOne(()=>Project,(project: Project) => task.project)
project: Project | null;
@ManyToOne(()=>Project,(task: {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