Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
planner-team-one
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
21
Issues
21
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Евгений Положенцев
planner-team-one
Commits
3bd0027b
Commit
3bd0027b
authored
Nov 08, 2022
by
“Yevgeniy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#32
format ModelTask
parent
6a0bcd24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
Task.ts
planner-api/src/models/Task.ts
+8
-11
User.ts
planner-api/src/models/User.ts
+1
-1
No files found.
planner-api/src/models/Task.ts
View file @
3bd0027b
...
...
@@ -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
;
...
...
@@ -57,10 +54,10 @@ import {
@
ManyToMany
(()
=>
User
,{
eager
:
true
})
@
JoinTable
()
executors
!
:
User
[];
@
ManyToOne
(()
=>
Project
,(
project
:{
tasks
:
Task
[]})
=>
project
.
tasks
)
project
!
:
Project
|
null
;
}
planner-api/src/models/User.ts
View file @
3bd0027b
...
...
@@ -68,7 +68,7 @@ export class User extends BaseEntity implements IUser {
@
Column
({
type
:
"enum"
,
enum
:
UserRole
,
default
:
UserRole
.
SUPER
USER
default
:
UserRole
.
USER
})
role
!
:
UserRole
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment