Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ehasa-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WIMMA Lab 2019
Overflow
ehasa-backend
Merge requests
!58
Development to testing
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Development to testing
Development
into
testing
Overview
0
Commits
50
Pipelines
0
Changes
1
Merged
Ghost User
requested to merge
Development
into
testing
5 years ago
Overview
0
Commits
50
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
bb4e64f9
Prev
Next
Show latest version
1 file
+
11
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
bb4e64f9
remove relation to mapdrawing, add relation to history, add data column
· bb4e64f9
Ronnie Friman
authored
5 years ago
src/game/game.entity.ts
+
11
−
6
Options
@@ -83,16 +83,21 @@ export class ObjectivePointEntity {
@
PrimaryGeneratedColumn
(
'
uuid
'
)
objectivePointId
:
string
;
@
Column
({
type
:
'
text
'
})
objectivePointDescription
:
string
;
@
Column
({
type
:
'
float
'
})
objectivePointMultiplier
:
number
;
@
Column
({
type
:
'
json
'
})
data
:
JSON
;
// If the MapDrawing or Game where the ObjectivePoint was in is deleted, the ObjectivePoint is also deleted
@
ManyToOne
(
type
=>
MapDrawingEntity
,
coordinate
=>
coordinate
.
data
,
{
onDelete
:
'
CASCADE
'
,
})
coordinate
:
MapDrawingEntity
;
// If the Game where the ObjectivePoint was in is deleted, the ObjectivePoint is also deleted
@
ManyToOne
(
type
=>
GameEntity
,
game
=>
game
.
objective_points
,
{
onDelete
:
'
CASCADE
'
,
})
game
:
GameEntity
;
@
OneToMany
(
()
=>
ObjectivePoint_HistoryEntity
,
history
=>
history
.
objective_point
,
{
onDelete
:
'
NO ACTION
'
,
},
)
history
:
ObjectivePoint_HistoryEntity
[];
}
@
Entity
(
'
ObjectivePoint_History
'
)
@@ -101,7 +106,7 @@ export class ObjectivePoint_HistoryEntity {
@
Column
({
type
:
'
timestamp
'
})
oP_HistoryTimestamp
:
Timestamp
;
@
Column
(
'
float
'
)
action
:
number
;
// If the owner Faction, capturer Faction or ObjectivePoint, that has, is trying to have or is the point where
// If the owner Faction, capturer Faction or ObjectivePoint, that has, is trying to have or is the point where
// ObjectivePointHistory points to is deleted, the ObjectivePointHistory is also deleted
@
ManyToOne
(
type
=>
FactionEntity
,
factionEntity
=>
factionEntity
.
factionId
,
{
onDelete
:
'
CASCADE
'
,
Loading