Fix types

This commit is contained in:
Babibubebon 2023-04-08 03:42:52 +09:00
parent 9ab036275e
commit 9ca2afbe49
Signed by: Babibubebon
GPG key ID: 78C8FB2A2FEA1EE3
3 changed files with 4 additions and 4 deletions

View file

@ -62,7 +62,7 @@ ISDNRecord(
author='専門',
shape='単行本',
contents='電子通信',
price=100,
price=Decimal('100'),
price_unit='JPY',
barcode2='2923055001007',
product_comment=None,

View file

@ -1,4 +1,3 @@
import json
import os
import time

View file

@ -1,5 +1,6 @@
import re
from datetime import date
from decimal import Decimal
from pydantic import Field, HttpUrl, root_validator, validator
from pydantic.dataclasses import dataclass
@ -139,13 +140,13 @@ class ISDNRecord(BaseXmlModel, nsmap=NSMAP):
author: str | None = element(tag="author")
shape: str | None = element(tag="shape")
contents: str | None = element(tag="contents")
price: int | None = element(tag="price")
price: Decimal | None = element(tag="price")
price_unit: str | None = element(tag="price-unit")
barcode2: str | None = element(tag="barcode2")
product_comment: str | None = element(tag="product-comment")
product_style: str | None = element(tag="product-style")
product_size: str | None = element(tag="product-size")
product_capacity: int | None = element(tag="product-capacity")
product_capacity: Decimal | None = element(tag="product-capacity")
product_capacity_unit: str | None = element(tag="product-capacity-unit")
sample_image_uri: HttpUrl | None = element(tag="sample-image-uri")
useroptions: list[UserOption] = Field(default_factory=list)