user_notifications.py 747 B

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