52 lines
954 B
Python
52 lines
954 B
Python
|
from apiflask import Schema
|
||
|
from apiflask.fields import Integer, String, Boolean, Nested, List
|
||
|
|
||
|
|
||
|
class LoginIn(Schema):
|
||
|
username = String(required=True)
|
||
|
password = String(required=True)
|
||
|
tenantId = String(required=True)
|
||
|
uuid = String()
|
||
|
code = String()
|
||
|
|
||
|
|
||
|
class LoginNestedOut(Schema):
|
||
|
token = String()
|
||
|
|
||
|
|
||
|
class LoginOut(Schema):
|
||
|
code = Integer()
|
||
|
msg = String()
|
||
|
data = Nested(LoginNestedOut)
|
||
|
|
||
|
|
||
|
class CaptchaImageNestedOut(Schema):
|
||
|
captchaEnabled = Boolean()
|
||
|
img = String()
|
||
|
uuid = String()
|
||
|
|
||
|
|
||
|
class CaptchaImageOut(Schema):
|
||
|
code = Integer()
|
||
|
msg = String()
|
||
|
data = Nested(CaptchaImageNestedOut)
|
||
|
|
||
|
|
||
|
class TenantOut(Schema):
|
||
|
companyName = String()
|
||
|
domain = String()
|
||
|
tenantId = String()
|
||
|
|
||
|
|
||
|
class TenantsNestedOut(Schema):
|
||
|
tenantEnabled = Boolean()
|
||
|
voList = List(Nested(TenantOut))
|
||
|
|
||
|
|
||
|
class TenantsOut(Schema):
|
||
|
code = Integer()
|
||
|
msg = String()
|
||
|
data = Nested(TenantsNestedOut)
|
||
|
|
||
|
|