You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
508 B
25 lines
508 B
import {
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
Column,
|
|
ManyToMany,
|
|
CreateDateColumn,
|
|
JoinTable
|
|
} from 'typeorm'
|
|
|
|
import User from 'src/users/entity/user.entity'
|
|
|
|
@Entity()
|
|
export default class Result {
|
|
@PrimaryGeneratedColumn()
|
|
id: number
|
|
|
|
@ManyToMany(() => User, (player: User) => player.results, { cascade: true })
|
|
players: Array<User | null> // TODO: change to User[] for final version
|
|
|
|
@Column('text', { array: true })
|
|
public score: number[]
|
|
|
|
@CreateDateColumn()
|
|
date: Date
|
|
}
|
|
|