sbt-idp/cope2n-api/fwd_api/request/UpsertUserRequest.py

14 lines
589 B
Python
Raw Normal View History

2023-11-30 11:19:06 +00:00
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