feat: schema mixins moved to project level
Resolves circular dependency issues.
This commit is contained in:
parent
e9fe405e06
commit
4ff9edf6d1
6 changed files with 38 additions and 43 deletions
|
|
@ -3,17 +3,12 @@ Pydantic models for service module
|
|||
|
||||
Models follow the nomenclature of:
|
||||
- Sub-models: "<Resource><Opt:>Schema"
|
||||
- Mixins: "<Attribute>Mixin"
|
||||
- Models: "<Module><Method><Resource><Opt:Resource><Direction>" ie "ServiceGetServiceResponse"
|
||||
"""
|
||||
|
||||
from pydantic import ConfigDict, Field
|
||||
from pydantic import ConfigDict
|
||||
|
||||
from src.schemas import CustomBaseModel
|
||||
|
||||
|
||||
class ServiceIDMixin(CustomBaseModel):
|
||||
service_id: int = Field(gt=0)
|
||||
from src.schemas import CustomBaseModel, ServiceIDMixin
|
||||
|
||||
|
||||
class ServiceSchema(CustomBaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue