Skip to content

Conversation

@Rupikz
Copy link
Member

@Rupikz Rupikz commented May 15, 2023

No description provided.

schema.graphql Outdated
updateLesson(input: UpdateLessonInput!): Lesson!
removeLesson(id: ID!): Boolean!

createEducationSubject(input: CreateEducationSubjectInput!): Subject!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EducationSubject

type LessonGroupByWeekDay {
weekDay: WeekDay!
lessons: [Lesson!]!
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У вас же расписание зависит от WeekDay и WeekType. Кажется тут группировка сломана.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, стремная группировка

timeStart: Time!
timeEnd: Time!
weekDay: WeekDay!
weekType: WeekType!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

190-191 - довольно хрупкая хуйня, если в каком-то универе расписание не будет завязано на чётные - нечётные недели

В качестве альтернативы можно сделать ScheduleType - отдельный тип, который будет описывать правила составления расписания. Первым очевидно будет стандартный механизм, основанный на чётности-нечётности недели. Но можно будет добавить и другие варианты.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно наверное решить это новым типом недели "WeekType.REGULAR" - такие уроки будут проходить каждую неделю, независимо от чётности

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants