Skip to content

Conversation

@michael-grace
Copy link
Member

Basically, allows us to have a group of, for example "freshers shows" or "results day shows" etc.. even though they're all different shows.

@URY-GitHub
Copy link

Thank you for this pull request, @michael-grace!

@ColinRoitt, would you mind reviewing this PR, please? Feel free to ask anyone for help if you're not quite sure what you're doing.

@michael-grace michael-grace changed the title MyRadio_Events (Grouping Timeslots across shows) MyRadio_Event (Grouping Timeslots across shows) Sep 4, 2020
@markspolakovs
Copy link
Member

Fairly sure this used to exist, in the form of show blocks… cc @mstratford do you know more?

Copy link
Contributor

@ColinRoitt ColinRoitt left a comment

Choose a reason for hiding this comment

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

Looks good to me - this isn't implemented anywhere near the front end yet, right?

{
"required": ["email"]
}]
"required": ["eduroam"]
Copy link
Contributor

Choose a reason for hiding this comment

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

nice linting tho

Copy link
Member

@markspolakovs markspolakovs left a comment

Choose a reason for hiding this comment

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

Would ideally like to see all future API stuff done over GraphQL, but the 2016-site infra isn't there yet, so that's fine. Couple small niggles.

create table schedule.events
(
event_id text not null
constraint events_pk
Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary, PRIMARY KEY would suffice

@@ -0,0 +1,22 @@
BEGIN;

create table schedule.events
Copy link
Member

Choose a reason for hiding this comment

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

Consider consistent singular/plural table names? (e.g. member, show_season)

'mixcloud_status' => $this->getMeta('upload_state'),
'mixcloud_starttime' => $this->getMeta('upload_starttime'),
'mixcloud_endtime' => $this->getMeta('upload_endtime'),
'events' => $this->events,
Copy link
Member

Choose a reason for hiding this comment

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

You're gonna want to recursively toDataSource this (or use the appropriate CoreUtil), otherwise you'll JSON-encode an array of MyRadio_Event classes

Copy link
Member Author

Choose a reason for hiding this comment

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

no, it'll just be the ids, that why $this->events not $this->getEvents()

Copy link
Member

Choose a reason for hiding this comment

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

We sure we want that? Perhaps make it a mixin to getEvents() - saves N API calls, where N is the number of events

* @throws MyRadioException
*/

public function addEvent($event_id){
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how I feel about having the same-ish method in both Event and Timeslot… but feel free to overrule me

Copy link
Member Author

Choose a reason for hiding this comment

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

can't hurt

Copy link
Member

Choose a reason for hiding this comment

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

it can actually

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.

5 participants