Commit b6b1987a authored by nanahira's avatar nanahira

fix super large thing

parent cc9d4245
Pipeline #35421 passed with stages
in 56 seconds
import { Entity, Index, ManyToOne, OneToMany } from 'typeorm';
import {
Entity,
Index,
ManyToOne,
OneToMany,
SelectQueryBuilder,
} from 'typeorm';
import {
applyQueryProperty,
BoolColumn,
EnumColumn,
IdBase,
IntColumn,
NotChangeable,
NotColumn,
NotInResult,
QueryEqual,
QueryMatchBoolean,
} from 'nicot';
......@@ -127,6 +121,7 @@ export class Match extends IdBase() {
@NotColumn()
@ManyToOne(() => Match, (match) => match.parentMatches)
@NotInResult()
childMatch: Match;
@NotColumn()
@OneToMany(() => Match, (match) => match.childMatch)
......
......@@ -4,6 +4,7 @@ import {
BoolColumn,
NotChangeable,
NotColumn,
NotInResult,
QueryEqual,
QueryMatchBoolean,
} from 'nicot';
......@@ -47,19 +48,22 @@ export class Participant extends NamedBase {
@NotColumn()
@OneToMany(() => Match, (match) => match.player1)
@NotInResult()
matches1: Match[];
@NotColumn()
@OneToMany(() => Match, (match) => match.player2)
@NotInResult()
matches2: Match[];
@NotColumn()
@OneToMany(() => Match, (match) => match.winner)
@NotInResult()
wonMatches: Match[];
@NotColumn()
@ApiProperty({ type: [Match], description: '参与的比赛。' })
matches: Match[];
//@NotColumn()
//@ApiProperty({ type: [Match], description: '参与的比赛。' })
//matches: Match[];
@NotColumn({
description: '该选手的成绩。',
......@@ -73,7 +77,7 @@ export class Participant extends NamedBase {
async afterGet() {
await super.afterGet();
this.matches = this.getMatches();
//this.matches = this.getMatches();
}
checkPermission(user: MycardUser) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment