artemis-model 0.1.111__py3-none-any.whl → 0.1.113__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/__init__.py CHANGED
@@ -15,3 +15,4 @@ from artemis_model.user import * # noqa
15
15
  from artemis_model.zone import * # noqa
16
16
  from artemis_model.otp import * # noqa
17
17
  from artemis_model.banned_tracks import * # noqa
18
+ from artemis_model.zone_activity import * # noqa
@@ -100,3 +100,4 @@ class BanTrackIn(BaseMessage):
100
100
  action: Action = Action.BAN_TRACK
101
101
  zone_id: int
102
102
  track_id: UUID
103
+ playlist_id: int
@@ -0,0 +1,29 @@
1
+ """Zone Activity Model"""
2
+
3
+ from sqlalchemy import Integer, String, JSON, Index
4
+ from sqlalchemy.orm import Mapped, mapped_column
5
+ from artemis_model.base import AuditMixin, TimeStampMixin, CustomSyncBase, CustomBase
6
+
7
+
8
+ class PlayerActivityMixin(TimeStampMixin, AuditMixin):
9
+ """User activity log, sorted by created_at DESC for retrieval"""
10
+
11
+ id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
12
+ player_id: Mapped[int] = mapped_column(Integer, nullable=False)
13
+ activity_type: Mapped[str] = mapped_column(String, nullable=False)
14
+ activity_data: Mapped[dict] = mapped_column(JSON, nullable=True)
15
+
16
+ __table_args__ = (
17
+ Index("idx_player_activity_player_created", "player_id", "created_at".desc()),
18
+ Index("idx_player_activity_created", "created_at".desc()),
19
+ )
20
+
21
+
22
+ class PlayerActivitySync(CustomSyncBase, PlayerActivityMixin):
23
+ """Sync model for Player Activity"""
24
+ pass
25
+
26
+
27
+ class PlayerActivity(CustomBase, PlayerActivityMixin):
28
+ """Base model for Player Activity"""
29
+ pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: artemis-model
3
- Version: 0.1.111
3
+ Version: 0.1.113
4
4
  Summary:
5
5
  Author: Jukeboxy
6
6
  Requires-Python: >=3.10.6,<4.0.0
@@ -1,4 +1,4 @@
1
- artemis_model/__init__.py,sha256=H2Cyijmm4KqmjvxJoPpyXZhFvrUZvM0g0X4lDoJ28qw,742
1
+ artemis_model/__init__.py,sha256=zEeAUndIbJdp_M6pFlON_BEehnMaMcTvusijGktpnvk,792
2
2
  artemis_model/album.py,sha256=9uw9HVNHVBjl-0Dgv-o5MHXhUPwedvbnbzzY3A1cKQg,2077
3
3
  artemis_model/artist.py,sha256=vjXlFN2mOEidAzUzxmsAP5GnVTvJUuhFdhQaH214lgw,1563
4
4
  artemis_model/auth.py,sha256=0Yg_6N1nj4U31F86u1PE0leIa3D64QlYrsDlavulN6s,4033
@@ -22,10 +22,11 @@ artemis_model/redis/zone_state.py,sha256=PgHiGUZ2WI3bqO-8CW2cwzLEQu3l4wJAzIABSWE
22
22
  artemis_model/schedule.py,sha256=CkLHWz-BwvUY2EQCfoU4SymgCariPzoQdtRLITqBPmk,2451
23
23
  artemis_model/setting.py,sha256=EWzOmE31mLNWwmV_wmqttHPMycvQZW7SJUIozF2b8bo,1190
24
24
  artemis_model/sqs/__init__.py,sha256=nHpXQns64qQ5Cqjyo6w9fDGO_wWhprqn1bhKf3eWnio,17
25
- artemis_model/sqs/messages.py,sha256=OVBSqjbVU87NiRz_BMkMKmzn9ylB2BUNFMl_ffqxikc,2647
25
+ artemis_model/sqs/messages.py,sha256=8PcZYUsh85x3TikZ4hBvGl_xUl9onKUwSCxZWgToEgQ,2668
26
26
  artemis_model/track.py,sha256=QwUF0QKVn1I64648B-NI75-IzGQvnLt9B0emD4GnS6E,3757
27
27
  artemis_model/user.py,sha256=eqIdCiBJRNLjCwPPCn-gQ6si0O5JUBGfp9oWJL5zVW4,2131
28
28
  artemis_model/zone.py,sha256=iGRUtzUwKh9LHT3MOfzzg1DnkPBts_ZBzZVTi2EmIgs,2282
29
- artemis_model-0.1.111.dist-info/METADATA,sha256=DTlKinVuHgB7Vsyzq3Eg7Vgqcyl3MHWkNYoca7iKGSI,3445
30
- artemis_model-0.1.111.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
31
- artemis_model-0.1.111.dist-info/RECORD,,
29
+ artemis_model/zone_activity.py,sha256=W2SLIISy-lBbTabbYRbXK1xErfvKTs3Np3fOMx6OL_k,1038
30
+ artemis_model-0.1.113.dist-info/METADATA,sha256=44PtxFQykOWsaXpYmBKd4kpK5xrI7B5CadeVpYzrbYA,3445
31
+ artemis_model-0.1.113.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
+ artemis_model-0.1.113.dist-info/RECORD,,