Compare commits
No commits in common. "62d9fb8516811c33a4b32315d08c69ffbbe68258" and "64323253875f814d40a4a89b9cf09f05817e7174" have entirely different histories.
62d9fb8516
...
6432325387
@ -14,7 +14,6 @@ class InvoiceHeaderCreate(BaseModel):
|
|||||||
|
|
||||||
class InvoiceHeaderOut(BaseModel):
|
class InvoiceHeaderOut(BaseModel):
|
||||||
id: int
|
id: int
|
||||||
app_user_id: Optional[int] = None
|
|
||||||
company_name: str
|
company_name: str
|
||||||
tax_number: str
|
tax_number: str
|
||||||
register_address: str
|
register_address: str
|
||||||
@ -22,8 +21,6 @@ class InvoiceHeaderOut(BaseModel):
|
|||||||
bank_name: str
|
bank_name: str
|
||||||
bank_account: str
|
bank_account: str
|
||||||
email: EmailStr
|
email: EmailStr
|
||||||
class Config:
|
|
||||||
from_attributes = True
|
|
||||||
|
|
||||||
|
|
||||||
class InvoiceHeaderUpdate(BaseModel):
|
class InvoiceHeaderUpdate(BaseModel):
|
||||||
|
|||||||
@ -104,7 +104,7 @@ class ValuationAssessmentUpdate(BaseModel):
|
|||||||
inheritor_certificates: Optional[List[Any]] = Field(None, description="非遗传承人等级证书")
|
inheritor_certificates: Optional[List[Any]] = Field(None, description="非遗传承人等级证书")
|
||||||
heritage_level: Optional[str] = Field(None, description="非遗等级")
|
heritage_level: Optional[str] = Field(None, description="非遗等级")
|
||||||
patent_application_no: Optional[str] = Field(None, description="非遗资产所用专利的申请号")
|
patent_application_no: Optional[str] = Field(None, description="非遗资产所用专利的申请号")
|
||||||
historical_evidence: Optional[Dict[str, int]] = Field(None, description="非遗资产历史证明证据及数量")
|
historical_evidence: Optional[List[Any]] = Field(None, description="非遗资产历史证明证据及数量")
|
||||||
patent_certificates: Optional[List[Any]] = Field(None, description="非遗资产所用专利的证书")
|
patent_certificates: Optional[List[Any]] = Field(None, description="非遗资产所用专利的证书")
|
||||||
pattern_images: Optional[List[Any]] = Field(None, description="非遗纹样图片")
|
pattern_images: Optional[List[Any]] = Field(None, description="非遗纹样图片")
|
||||||
report_url: Optional[str] = Field(None, description="评估报告URL")
|
report_url: Optional[str] = Field(None, description="评估报告URL")
|
||||||
@ -129,20 +129,6 @@ class ValuationAssessmentUpdate(BaseModel):
|
|||||||
|
|
||||||
is_active: Optional[bool] = Field(None, description="是否激活")
|
is_active: Optional[bool] = Field(None, description="是否激活")
|
||||||
|
|
||||||
@field_validator('report_url', 'certificate_url', mode='before')
|
|
||||||
@classmethod
|
|
||||||
def _coerce_url(cls, v):
|
|
||||||
if v is None:
|
|
||||||
return None
|
|
||||||
if isinstance(v, list) and v:
|
|
||||||
v = v[0]
|
|
||||||
if isinstance(v, str):
|
|
||||||
s = v.strip()
|
|
||||||
if s.startswith('`') and s.endswith('`'):
|
|
||||||
s = s[1:-1].strip()
|
|
||||||
return s
|
|
||||||
return v
|
|
||||||
|
|
||||||
|
|
||||||
class ValuationAssessmentOut(ValuationAssessmentBase):
|
class ValuationAssessmentOut(ValuationAssessmentBase):
|
||||||
"""估值评估输出模型"""
|
"""估值评估输出模型"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user