parent
71cc25dbb2
commit
e11bcc2a08
|
@ -47,13 +47,12 @@ class AvailabilitySchema(spec.BaseModel):
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
class PlayerTeamAvailabilityRoleSchema(spec.BaseModel):
|
class PlayerTeamAvailabilityRoleSchema(spec.BaseModel):
|
||||||
from models.player import PlayerSchema
|
player: "PlayerSchema"
|
||||||
from models.player_team_role import RoleSchema
|
|
||||||
|
|
||||||
player: PlayerSchema
|
|
||||||
playtime: int
|
playtime: int
|
||||||
availability: int
|
availability: int
|
||||||
roles: list[RoleSchema]
|
roles: list["RoleSchema"]
|
||||||
|
|
||||||
|
|
||||||
|
from models.player import PlayerSchema
|
||||||
|
from models.player_team_role import RoleSchema
|
||||||
from models.player_team import PlayerTeam
|
from models.player_team import PlayerTeam
|
||||||
|
|
|
@ -20,8 +20,7 @@ spec = SpecTree(
|
||||||
nested_naming_strategy=nested_naming_strategy
|
nested_naming_strategy=nested_naming_strategy
|
||||||
)
|
)
|
||||||
|
|
||||||
class BaseModel(pydantic.v1.BaseModel):
|
class BaseModel(pydantic.BaseModel):
|
||||||
class Config:
|
class Config:
|
||||||
alias_generator = to_camel
|
alias_generator = to_camel
|
||||||
allow_population_by_field_name = True
|
populate_by_name = True
|
||||||
smart_union = True
|
|
||||||
|
|
Loading…
Reference in New Issue