Coverage for polar/models/user_notification.py: 100%
8 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 15:52 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 15:52 +0000
1from uuid import UUID 1ab
3from sqlalchemy import ForeignKey, Uuid 1ab
4from sqlalchemy.orm import Mapped, mapped_column 1ab
6from polar.kit.db.models import Model 1ab
9class UserNotification(Model): 1ab
10 __tablename__ = "user_notifications" 1ab
12 user_id: Mapped[UUID] = mapped_column( 1ab
13 Uuid,
14 ForeignKey("users.id"),
15 nullable=False,
16 primary_key=True,
17 )
19 last_read_notification_id: Mapped[UUID] = mapped_column( 1ab
20 Uuid,
21 nullable=True,
22 )