feat: add limited round-robin scheduling
This commit is contained in:
1 parent
24983aeb09
commit
658592973e
15 files changed
+403
-63
No files matched your search
@@ -487,6 +487,7 @@ export interface MatchSeriesResult {
|
||||
|
||||
export interface MatchGameAssignment {
|
||||
gameNumber: number;
|
||||
roundNumber?: number;
|
||||
teamAIndex: number;
|
||||
teamBIndex: number;
|
||||
}
|
||||
@@ -524,6 +525,7 @@ export interface Match extends MongooseTimestamps {
|
||||
maxParticipants: number;
|
||||
gameCount: number;
|
||||
gameMode: MatchGameMode;
|
||||
roundRobinMaxRounds?: number;
|
||||
tournamentCodeIds: mongoose.Types.ObjectId[];
|
||||
gameSchedule: MatchGameAssignment[];
|
||||
teamBuiltAt?: Date;
|
||||
@@ -1284,6 +1286,7 @@ const MatchSeriesResultSubSchema = new Schema<MatchSeriesResult>(
|
||||
const MatchGameAssignmentSubSchema = new Schema<MatchGameAssignment>(
|
||||
{
|
||||
gameNumber: { type: Number, required: true, min: 1 },
|
||||
roundNumber: { type: Number, required: false, min: 1 },
|
||||
teamAIndex: { type: Number, required: true, min: 1 },
|
||||
teamBIndex: { type: Number, required: true, min: 1 },
|
||||
},
|
||||
@@ -1389,6 +1392,7 @@ export const MatchSchema = new Schema<Match>(
|
||||
required: true,
|
||||
default: 'pair',
|
||||
},
|
||||
roundRobinMaxRounds: { type: Number, required: false, min: 1 },
|
||||
tournamentCodeIds: {
|
||||
type: [{ type: Schema.Types.ObjectId, ref: 'tournamentCode' }],
|
||||
required: true,
|
||||
|
||||
Reference in new issue
Block a user