|
|
@ -97,7 +97,7 @@ export default class JudgeState extends Model { |
|
|
|
|
|
|
|
|
|
|
|
@TypeORM.Column({ nullable: true, type: "integer" }) |
|
|
|
@TypeORM.Column({ nullable: true, type: "integer" }) |
|
|
|
type_info: number; |
|
|
|
type_info: number; |
|
|
|
|
|
|
|
|
|
|
|
@TypeORM.Index() |
|
|
|
@TypeORM.Index() |
|
|
|
@TypeORM.Column({ nullable: true, type: "boolean" }) |
|
|
|
@TypeORM.Column({ nullable: true, type: "boolean" }) |
|
|
|
is_public: boolean; |
|
|
|
is_public: boolean; |
|
|
@ -114,6 +114,10 @@ export default class JudgeState extends Model { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async saveHook() { |
|
|
|
|
|
|
|
if (this.score === null) this.score = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async isAllowedVisitBy(user) { |
|
|
|
async isAllowedVisitBy(user) { |
|
|
|
await this.loadRelationships(); |
|
|
|
await this.loadRelationships(); |
|
|
|
|
|
|
|
|
|
|
|