Skip to content
Snippets Groups Projects
Commit a387343e authored by L4168's avatar L4168
Browse files

updated table to match db design

parent 3bd5bcb3
No related branches found
No related tags found
4 merge requests!59Development to master,!31Development,!25Dto service,!24Faction task edit
import { PrimaryGeneratedColumn, Column, Entity, ManyToOne } from 'typeorm';
import {
PrimaryGeneratedColumn,
Column,
Entity,
ManyToOne,
JoinColumn,
} from 'typeorm';
import { FactionEntity } from 'src/game/faction.entity';
import { GameEntity } from 'src/game/game.entity';
@Entity('Task')
export class TaskEntity {
@PrimaryGeneratedColumn('uuid') taskId: string;
@Column({ type: 'text' }) taskName: string;
@Column({ type: 'text' }) taskDescription: string;
@Column({ type: 'float' }) taskScore: number;
@Column({ type: 'text' }) taskWinner: string;
@Column({ type: 'bool' }) taskIsActive: boolean;
@ManyToOne(type => FactionEntity, faction => faction.factionId)
faction: FactionEntity;
@ManyToOne(type => FactionEntity, faction => faction.factionId)
taskWinner: FactionEntity;
@ManyToOne(type => GameEntity, game => game.id)
@JoinColumn({ name: 'taskGame' })
taskGame: GameEntity;
}
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