# What this PR does This PR should allow us to start working on _most_ of the remaining tasks for this feature set. - Adds a basic `ShiftSwapRequest` model + CRUD endpoints. - Adds a `POST /api/internal/v1/shift_swaps/<id>/take` endpoint which allows a benefactor to take a request (only when certain conditions about the ssr are met) Closes #2587 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) will be done in #2589 - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) (will update once we ship the finalized feature set)
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
from rest_framework import serializers
|
|
|
|
from apps.mobile_app.models import MobileAppUserSettings
|
|
from common.api_helpers.custom_fields import TimeZoneField
|
|
|
|
|
|
class MobileAppUserSettingsSerializer(serializers.ModelSerializer):
|
|
time_zone = TimeZoneField(required=False, allow_null=False)
|
|
|
|
class Meta:
|
|
model = MobileAppUserSettings
|
|
fields = (
|
|
"info_notification_sound_name",
|
|
"info_notification_volume_type",
|
|
"info_notification_volume",
|
|
"info_notification_volume_override",
|
|
"default_notification_sound_name",
|
|
"default_notification_volume_type",
|
|
"default_notification_volume",
|
|
"default_notification_volume_override",
|
|
"important_notification_sound_name",
|
|
"important_notification_volume_type",
|
|
"important_notification_volume",
|
|
"important_notification_volume_override",
|
|
"important_notification_override_dnd",
|
|
"info_notifications_enabled",
|
|
"going_oncall_notification_timing",
|
|
"locale",
|
|
"time_zone",
|
|
)
|