Commit 3bd0027b authored by “Yevgeniy's avatar “Yevgeniy

#32 format ModelTask

parent 6a0bcd24
...@@ -30,13 +30,6 @@ import { ...@@ -30,13 +30,6 @@ import {
export class Task extends BaseEntity implements ITask{ export class Task extends BaseEntity implements ITask{
@PrimaryGeneratedColumn('uuid') @PrimaryGeneratedColumn('uuid')
id!: string id!: string
@Column({ name: 'dateTimeStart', type: Date,nullable: true })
dateTimeStart!: Date | null;
@Column({ name: 'dateTimeDue', type: Date,nullable: true })
dateTimeDue!: Date | null;
@Column({ name: 'title', type: 'varchar', length:50,nullable: false }) @Column({ name: 'title', type: 'varchar', length:50,nullable: false })
title!: string title!: string
@Column({ name: 'description', type: 'varchar', length:50,nullable: true }) @Column({ name: 'description', type: 'varchar', length:50,nullable: true })
...@@ -50,6 +43,10 @@ import { ...@@ -50,6 +43,10 @@ import {
}) })
accomplish!: taskFinishType accomplish!: taskFinishType
@Column({ name: 'dateTimeStart', type: Date,nullable: true })
dateTimeStart!: Date | null;
@Column({ name: 'dateTimeDue', type: Date,nullable: true })
dateTimeDue!: Date | null;
@ManyToOne(() => User, (user: { tasks: Task[]; }) => user.tasks,{eager : true}) @ManyToOne(() => User, (user: { tasks: Task[]; }) => user.tasks,{eager : true})
author!: User; author!: User;
...@@ -57,10 +54,10 @@ import { ...@@ -57,10 +54,10 @@ import {
@ManyToMany(() => User,{eager : true}) @ManyToMany(() => User,{eager : true})
@JoinTable() @JoinTable()
executors!: User[]; executors!: User[];
@ManyToOne(()=>Project,(project:{tasks: Task[]}) => project.tasks) @ManyToOne(()=>Project,(project:{tasks: Task[]}) => project.tasks)
project!: Project | null; project!: Project | null;
} }
...@@ -68,7 +68,7 @@ export class User extends BaseEntity implements IUser { ...@@ -68,7 +68,7 @@ export class User extends BaseEntity implements IUser {
@Column({ @Column({
type: "enum", type: "enum",
enum: UserRole, enum: UserRole,
default: UserRole.SUPERUSER default: UserRole.USER
}) })
role!: UserRole role!: UserRole
......
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