artemis-model 0.1.79__py3-none-any.whl → 0.1.81__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
artemis_model/playlist.py
CHANGED
@@ -30,6 +30,21 @@ class FavoritePlaylist(CustomBase, FavoritePlaylistMixin):
|
|
30
30
|
pass
|
31
31
|
|
32
32
|
|
33
|
+
class OrganizationApprovedPlaylistMixin(TimeStampMixin):
|
34
|
+
playlist_id: Mapped[int] = mapped_column(
|
35
|
+
ForeignKey("playlist.id"), primary_key=True
|
36
|
+
)
|
37
|
+
organization_id: Mapped[uuid.UUID] = mapped_column(ForeignKey("organization.id"), primary_key=True)
|
38
|
+
|
39
|
+
|
40
|
+
class OrganizationApprovedPlaylistSync(CustomSyncBase, OrganizationApprovedPlaylistMixin):
|
41
|
+
pass
|
42
|
+
|
43
|
+
|
44
|
+
class OrganizationApprovedPlaylist(CustomBase, OrganizationApprovedPlaylistMixin):
|
45
|
+
pass
|
46
|
+
|
47
|
+
|
33
48
|
class PlaylistMixin(TimeStampMixin):
|
34
49
|
id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
|
35
50
|
name: Mapped[str] = mapped_column(nullable=False, unique=True)
|
@@ -62,10 +77,24 @@ class PlaylistMixin(TimeStampMixin):
|
|
62
77
|
lazy="select"
|
63
78
|
)
|
64
79
|
|
80
|
+
@declared_attr
|
81
|
+
def org_approved_playlist_associations(cls):
|
82
|
+
return relationship(
|
83
|
+
"OrganizationApprovedPlaylist",
|
84
|
+
primaryjoin="and_(OrganizationApprovedPlaylist.playlist_id == Playlist.id)",
|
85
|
+
viewonly=True,
|
86
|
+
lazy="select"
|
87
|
+
)
|
88
|
+
|
65
89
|
@hybrid_property
|
66
90
|
def is_favorite(self):
|
67
91
|
return bool(self.favorite_playlist_associations)
|
68
92
|
|
93
|
+
@hybrid_property
|
94
|
+
def is_org_approved(self):
|
95
|
+
return bool(self.org_approved_playlist_associations)
|
96
|
+
|
97
|
+
|
69
98
|
@declared_attr
|
70
99
|
def category_playlist_associations(cls) -> Mapped[
|
71
100
|
list["PlaylistCategoryAssoc"]
|
@@ -11,12 +11,12 @@ artemis_model/message.py,sha256=gua3X_1hS7akmS42wQGtL0I-FCJUHdTBM4n2DW4hTxQ,3280
|
|
11
11
|
artemis_model/organization.py,sha256=hu9jKB2qu57BwN0sUUK13p3tC-Hqw9EghFMqjFP9Pr4,2387
|
12
12
|
artemis_model/otp.py,sha256=TjZ_EHeIedjsLIqyZTtzd0s6Uc-1dleMEV8DhzsW44o,1046
|
13
13
|
artemis_model/permission.py,sha256=sEBRN-bQJl2TNtRJ5LRuySoEbW1lY4DCoyRk0nOM-kY,1503
|
14
|
-
artemis_model/playlist.py,sha256=
|
14
|
+
artemis_model/playlist.py,sha256=AfpKo5LHm-R-LomkqBmOFliQRLGH4zbBDWSs1uZvGz0,7422
|
15
15
|
artemis_model/schedule.py,sha256=pnoKDMlUh28o61I7kZddNYn6z-uqOt_ml1nbWxKVeRM,1722
|
16
16
|
artemis_model/setting.py,sha256=McWbeDZP45km3VSSwP1BgAmmjO4qCL0pTnOmJVAz0WI,1265
|
17
17
|
artemis_model/track.py,sha256=x8BHKDZl9uQmQH6DWpzH-SEsfecLghOBdBT7qXgN3d0,3865
|
18
18
|
artemis_model/user.py,sha256=ZtZVwavSPoQmYM1_MarMULy-DJa2pH482G_G8su0b6c,2211
|
19
19
|
artemis_model/zone.py,sha256=iGRUtzUwKh9LHT3MOfzzg1DnkPBts_ZBzZVTi2EmIgs,2282
|
20
|
-
artemis_model-0.1.
|
21
|
-
artemis_model-0.1.
|
22
|
-
artemis_model-0.1.
|
20
|
+
artemis_model-0.1.81.dist-info/METADATA,sha256=cY6JdsyVE0NQv13eR5-yVq9KnPEl4O6PQb0bHttuCnk,3402
|
21
|
+
artemis_model-0.1.81.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
22
|
+
artemis_model-0.1.81.dist-info/RECORD,,
|