Skip to content
Snippets Groups Projects

Corrected database and started role controller

Merged L4072 requested to merge RoleAccess into Development
4 files
+ 23
12
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 12
5
@@ -19,7 +19,9 @@ export class FactionEntity {
@@ -19,7 +19,9 @@ export class FactionEntity {
@Column({ type: 'text' }) factionPassword: string;
@Column({ type: 'text' }) factionPassword: string;
@Column({ type: 'float' }) multiplier: number;
@Column({ type: 'float' }) multiplier: number;
@ManyToOne(type => GameEntity, gameEntity => gameEntity.id)
@OneToMany(type => Game_PersonEntity, game_persons => game_persons.faction)
 
game_persons: Game_PersonEntity[];
 
@ManyToOne(type => GameEntity, game => game.id)
gameId: GameEntity;
gameId: GameEntity;
}
}
@@ -30,6 +32,9 @@ export class PowerUpEntity {
@@ -30,6 +32,9 @@ export class PowerUpEntity {
@Column({ type: 'text' }) powerUpDescription: string;
@Column({ type: 'text' }) powerUpDescription: string;
@Column({ type: 'int' }) amount: number;
@Column({ type: 'int' }) amount: number;
@Column({ type: 'time' }) cooldown: string;
@Column({ type: 'time' }) cooldown: string;
 
 
@OneToMany(type => FactionEntity, factions => factions.factionId)
 
factions: Faction_PowerUpEntity[];
}
}
@Entity('Faction_PowerUp')
@Entity('Faction_PowerUp')
@@ -38,8 +43,10 @@ export class Faction_PowerUpEntity {
@@ -38,8 +43,10 @@ export class Faction_PowerUpEntity {
@ManyToOne(type => FactionEntity, faction => faction.factionId)
@ManyToOne(type => FactionEntity, faction => faction.factionId)
faction: FactionEntity;
faction: FactionEntity;
@ManyToOne(type => PowerUpEntity, powerUp => powerUp.powerUpId)
@ManyToOne(type => PowerUpEntity, powerUp => powerUp.factions)
powerUp: PowerUpEntity;
powerUp: PowerUpEntity;
 
@OneToMany(type => FP_HistoryEntity, histories => histories.faction_PowerUp)
 
histories: FP_HistoryEntity[];
}
}
@Entity('FP_History')
@Entity('FP_History')
@@ -49,7 +56,7 @@ export class FP_HistoryEntity {
@@ -49,7 +56,7 @@ export class FP_HistoryEntity {
@ManyToOne(
@ManyToOne(
type => Faction_PowerUpEntity,
type => Faction_PowerUpEntity,
faction_PowerUp => faction_PowerUp.faction_powerUpId,
faction_PowerUp => faction_PowerUp.histories,
)
)
faction_PowerUp: Faction_PowerUpEntity;
faction_PowerUp: Faction_PowerUpEntity;
}
}
@@ -74,6 +81,6 @@ export class TaskEntity {
@@ -74,6 +81,6 @@ export class TaskEntity {
@ManyToOne(type => FactionEntity, faction => faction.factionId)
@ManyToOne(type => FactionEntity, faction => faction.factionId)
faction: FactionEntity;
faction: FactionEntity;
@ManyToOne(type => Game_PersonEntity, person => person.gamepersonId)
/* @ManyToOne(type => PersonEntity, person => person.tasks)
personId: Game_PersonEntity;
person: PersonEntity; */
}
}
Loading