Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine
Commits
e0a82b2a
Commit
e0a82b2a
authored
1 year ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
feat: add getters
parent
6da8c1f4
No related branches found
No related tags found
1 merge request
!35
ORM-less scheduling
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/aura_engine/scheduling/domain.py
+36
-0
36 additions, 0 deletions
src/aura_engine/scheduling/domain.py
with
36 additions
and
0 deletions
src/aura_engine/scheduling/domain.py
+
36
−
0
View file @
e0a82b2a
...
...
@@ -255,6 +255,24 @@ class Timeslot:
self
.
show
=
show
self
.
episode
=
episode
def
get_id
(
self
)
->
int
:
"""
Get ID.
Returns:
int: The ID.
"""
return
self
.
id
def
get_repetition_id
(
self
)
->
int
:
"""
Get ID of the timeslot this timeslot is a repetition of.
Returns:
int: Repetition timeslot ID. None if it is not a repeating timeslot.
"""
return
self
.
repetition_id
def
set_playlists
(
self
,
pl_timeslot
:
Playlist
,
pl_schedule
:
Playlist
,
pl_show
:
Playlist
):
"""
Set all playlists and their respective types at once.
...
...
@@ -330,6 +348,24 @@ class Timeslot:
"""
return
self
.
get_end
()
-
self
.
get_start
()
def
get_show
(
self
)
->
Show
:
"""
Get show associated with the timeslot.
Returns:
Show: The show.
"""
return
self
.
show
def
get_episode
(
self
)
->
Episode
:
"""
Get episode associated with the timeslot.
Returns:
Episode: The episode.
"""
return
self
.
episode
def
__str__
(
self
)
->
str
:
"""
String representation.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment