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 { import {
Entity,
Index,
ManyToOne,
OneToMany,
SelectQueryBuilder,
} from 'typeorm';
import {
applyQueryProperty,
BoolColumn, BoolColumn,
EnumColumn, EnumColumn,
IdBase, IdBase,
IntColumn, IntColumn,
NotChangeable, NotChangeable,
NotColumn, NotColumn,
NotInResult,
QueryEqual, QueryEqual,
QueryMatchBoolean, QueryMatchBoolean,
} from 'nicot'; } from 'nicot';
...@@ -127,6 +121,7 @@ export class Match extends IdBase() { ...@@ -127,6 +121,7 @@ export class Match extends IdBase() {
@NotColumn() @NotColumn()
@ManyToOne(() => Match, (match) => match.parentMatches) @ManyToOne(() => Match, (match) => match.parentMatches)
@NotInResult()
childMatch: Match; childMatch: Match;
@NotColumn() @NotColumn()
@OneToMany(() => Match, (match) => match.childMatch) @OneToMany(() => Match, (match) => match.childMatch)
......
...@@ -4,6 +4,7 @@ import { ...@@ -4,6 +4,7 @@ import {
BoolColumn, BoolColumn,
NotChangeable, NotChangeable,
NotColumn, NotColumn,
NotInResult,
QueryEqual, QueryEqual,
QueryMatchBoolean, QueryMatchBoolean,
} from 'nicot'; } from 'nicot';
...@@ -47,19 +48,22 @@ export class Participant extends NamedBase { ...@@ -47,19 +48,22 @@ export class Participant extends NamedBase {
@NotColumn() @NotColumn()
@OneToMany(() => Match, (match) => match.player1) @OneToMany(() => Match, (match) => match.player1)
@NotInResult()
matches1: Match[]; matches1: Match[];
@NotColumn() @NotColumn()
@OneToMany(() => Match, (match) => match.player2) @OneToMany(() => Match, (match) => match.player2)
@NotInResult()
matches2: Match[]; matches2: Match[];
@NotColumn() @NotColumn()
@OneToMany(() => Match, (match) => match.winner) @OneToMany(() => Match, (match) => match.winner)
@NotInResult()
wonMatches: Match[]; wonMatches: Match[];
@NotColumn() //@NotColumn()
@ApiProperty({ type: [Match], description: '参与的比赛。' }) //@ApiProperty({ type: [Match], description: '参与的比赛。' })
matches: Match[]; //matches: Match[];
@NotColumn({ @NotColumn({
description: '该选手的成绩。', description: '该选手的成绩。',
...@@ -73,7 +77,7 @@ export class Participant extends NamedBase { ...@@ -73,7 +77,7 @@ export class Participant extends NamedBase {
async afterGet() { async afterGet() {
await super.afterGet(); await super.afterGet();
this.matches = this.getMatches(); //this.matches = this.getMatches();
} }
checkPermission(user: MycardUser) { 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