2024-02-07 05:39:24 +00:00
|
|
|
from rest_framework import serializers
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
|
|
class ReportCreationSerializer(serializers.Serializer):
|
|
|
|
is_daily_report = serializers.BooleanField(
|
|
|
|
help_text='Whether to include test record or not',
|
|
|
|
default=False
|
|
|
|
)
|
|
|
|
start_date = serializers.DateField(
|
|
|
|
help_text='Start date (YYYY-mm-DD)',
|
|
|
|
default='2024-01-02'
|
|
|
|
)
|
|
|
|
end_date = serializers.DateField(
|
|
|
|
help_text='End date (YYYY-mm-DD)',
|
|
|
|
default='2024-01-10'
|
|
|
|
)
|
|
|
|
include_test = serializers.BooleanField(
|
|
|
|
help_text='Whether to include test record or not',
|
|
|
|
default=False
|
|
|
|
)
|
|
|
|
# is_reviewed = serializers.ChoiceField(
|
|
|
|
# help_text='Which records to be query',
|
|
|
|
# # choices=['reviewed', 'not reviewed', 'all'],
|
|
|
|
# default=False
|
|
|
|
# )
|
|
|
|
# request_id = serializers.CharField(
|
|
|
|
# help_text='Specific request id'
|
|
|
|
# )
|
|
|
|
# redemption_id = serializers.CharField(
|
|
|
|
# help_text='Specific redemption id'
|
|
|
|
# )
|
|
|
|
subsidiary = serializers.CharField(
|
|
|
|
help_text='Subsidiary',
|
|
|
|
default="all"
|
|
|
|
)
|
|
|
|
report_overview_duration = serializers.CharField(
|
|
|
|
help_text=f'open of {settings.OVERVIEW_REPORT_DURATION}',
|
|
|
|
default=None
|
2024-03-06 07:56:02 +00:00
|
|
|
)
|
|
|
|
report_type = serializers.ChoiceField(
|
|
|
|
help_text='What type of report to create',
|
|
|
|
choices=['billing', 'accuracy'],
|
|
|
|
default="accuracy"
|
2024-02-07 05:39:24 +00:00
|
|
|
)
|