Coverage for polar/models/user_notification.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-12-05 17:15 +0000

1from uuid import UUID 1ab

2 

3from sqlalchemy import ForeignKey, Uuid 1ab

4from sqlalchemy.orm import Mapped, mapped_column 1ab

5 

6from polar.kit.db.models import Model 1ab

7 

8 

9class UserNotification(Model): 1ab

10 __tablename__ = "user_notifications" 1ab

11 

12 user_id: Mapped[UUID] = mapped_column( 1ab

13 Uuid, 

14 ForeignKey("users.id"), 

15 nullable=False, 

16 primary_key=True, 

17 ) 

18 

19 last_read_notification_id: Mapped[UUID] = mapped_column( 1ab

20 Uuid, 

21 nullable=True, 

22 )