Skip to content
Snippets Groups Projects
Commit 05626522 authored by L4072's avatar L4072
Browse files

More comments

parent ef08fa11
No related branches found
No related tags found
3 merge requests!59Development to master,!54Development to testing,!52Commenting to Development
import { Game_PersonEntity } from '../game/game.entity';
import { Allow, ValidateNested } from 'class-validator'; import { Allow, ValidateNested } from 'class-validator';
import { GeoDTO } from './geo.dto'; import { GeoDTO } from './geo.dto';
import { Type } from 'class-transformer'; import { Type } from 'class-transformer';
......
...@@ -9,6 +9,7 @@ export class TrackingEntity { ...@@ -9,6 +9,7 @@ export class TrackingEntity {
@Column({ type: 'json', nullable: true }) data: GeoDTO[]; @Column({ type: 'json', nullable: true }) data: GeoDTO[];
@Column('text') icon: string; @Column('text') icon: string;
// when the GamePerson is deleted it's tracking data is also deleted
@ManyToOne(type => Game_PersonEntity, person => person.gamepersonId, { @ManyToOne(type => Game_PersonEntity, person => person.gamepersonId, {
onDelete: 'CASCADE', onDelete: 'CASCADE',
}) })
......
...@@ -7,6 +7,10 @@ import { TrackingEntity } from './tracking.entity'; ...@@ -7,6 +7,10 @@ import { TrackingEntity } from './tracking.entity';
import { Game_PersonEntity } from '../game/game.entity'; import { Game_PersonEntity } from '../game/game.entity';
import { PersonEntity } from '../user/user.entity'; import { PersonEntity } from '../user/user.entity';
/////////////////////////////////////////////////////////////////////
/// Tracking ///
/// - contains everything to do with Tracking data. ///
/////////////////////////////////////////////////////////////////////
@Module({ @Module({
imports: [ imports: [
TypeOrmModule.forFeature([TrackingEntity, Game_PersonEntity, PersonEntity]), TypeOrmModule.forFeature([TrackingEntity, Game_PersonEntity, PersonEntity]),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment