Skip to content

Commit 17c6fc8

Browse files
feat(update): Pydantic model (#3820)
### Changed - Update model for invoice
1 parent 74f5c09 commit 17c6fc8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

cg/models/invoice/invoice.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from typing import Any
44

5-
from pydantic.v1 import BaseModel
5+
from pydantic import BaseModel
66

77
from cg.constants.priority import PriorityTerms
88
from cg.constants.sequencing import RecordType
@@ -21,7 +21,7 @@ class InvoiceContact(BaseModel):
2121
class InvoiceApplication(BaseModel):
2222
"""Class to collect Application information used in the invoice."""
2323

24-
version: str
24+
version: int
2525
tag: str
2626
discounted_price: int
2727
percent_kth: int
@@ -31,27 +31,27 @@ class InvoiceInfo(BaseModel):
3131
"""Class to collect invoice information used in the invoice report."""
3232

3333
name: str
34-
id: str
35-
lims_id: str | None
34+
id: int
35+
lims_id: str | None = None
3636
application_tag: str
3737
project: str
38-
date: Any | None
38+
date: Any | None = None
3939
price: int
4040
priority: PriorityTerms
41-
price_kth: int | None
42-
total_price: int | None
41+
price_kth: int | None = None
42+
total_price: int | None = None
4343

4444

4545
class InvoiceReport(BaseModel):
4646
"""Class that collects information used to create the invoice Excel sheet."""
4747

4848
cost_center: str
49-
project_number: str | None
49+
project_number: str | None = None
5050
customer_id: str
5151
customer_name: str
52-
agreement: str | None
52+
agreement: str | None = None
5353
invoice_id: int
5454
contact: dict
5555
records: list
56-
pooled_samples: Any | None
56+
pooled_samples: Any | None = None
5757
record_type: RecordType

0 commit comments

Comments
 (0)