user_notifications.py 609 B

123456789101112131415161718192021222324
  1. """Schemas for user email notification preferences."""
  2. from pydantic import BaseModel
  3. class UserEmailPreferenceResponse(BaseModel):
  4. """Response schema for user email notification preferences."""
  5. notify_print_start: bool
  6. notify_print_complete: bool
  7. notify_print_failed: bool
  8. notify_print_stopped: bool
  9. class Config:
  10. from_attributes = True
  11. class UserEmailPreferenceUpdate(BaseModel):
  12. """Update schema for user email notification preferences."""
  13. notify_print_start: bool
  14. notify_print_complete: bool
  15. notify_print_failed: bool
  16. notify_print_stopped: bool