2024-10-09 18:55:16 +00:00
|
|
|
package contests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2024-10-13 14:01:36 +00:00
|
|
|
"git.sch9.ru/new_gate/ms-tester/internal/models"
|
2024-10-09 18:55:16 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type ContestUseCase interface {
|
2024-10-13 14:01:36 +00:00
|
|
|
CreateContest(ctx context.Context, title string) (int32, error)
|
2024-10-09 18:55:16 +00:00
|
|
|
ReadContestById(ctx context.Context, id int32) (*models.Contest, error)
|
|
|
|
DeleteContest(ctx context.Context, id int32) error
|
2024-11-11 11:41:51 +00:00
|
|
|
AddTask(ctx context.Context, contestId int32, taskId int32) (int32, error)
|
|
|
|
DeleteTask(ctx context.Context, taskId int32) error
|
2024-11-14 12:09:52 +00:00
|
|
|
AddParticipant(ctx context.Context, contestId int32, userId int32) (int32, error)
|
|
|
|
DeleteParticipant(ctx context.Context, participantId int32) error
|
2024-10-09 18:55:16 +00:00
|
|
|
}
|