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

#23 added many to oone relation in task fix

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