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

#32 format ModelTask

parent 6a0bcd24
......@@ -30,13 +30,6 @@ import {
export class Task extends BaseEntity implements ITask{
@PrimaryGeneratedColumn('uuid')
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 })
title!: string
@Column({ name: 'description', type: 'varchar', length:50,nullable: true })
......@@ -50,6 +43,10 @@ import {
})
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})
author!: User;
......
......@@ -68,7 +68,7 @@ export class User extends BaseEntity implements IUser {
@Column({
type: "enum",
enum: UserRole,
default: UserRole.SUPERUSER
default: UserRole.USER
})
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