sbt-idp/cope2n-api/fwd_api/request/UpsertUserRequest.py
2023-11-30 18:19:06 +07:00

14 lines
589 B
Python
Executable File

from rest_framework import serializers
class UpsertUserRequest(serializers.Serializer):
plan_code = serializers.CharField(required=False, max_length=100, allow_blank=False)
status = serializers.IntegerField(required=False, max_value=1)
plan_start_at = serializers.CharField(required=False, max_length=100, allow_blank=False)
email = serializers.EmailField(required=False, max_length=200, allow_blank=True)
name = serializers.CharField(required=False, max_length=200, allow_blank=True)
def validate(self, attrs):
# Todo Validate here
return attrs