Skip to content

Commit

Permalink
feat(update): Pydantic model (#3820)
Browse files Browse the repository at this point in the history
### Changed

- Update model for invoice
  • Loading branch information
henrikstranneheim authored Oct 10, 2024
1 parent 74f5c09 commit 17c6fc8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cg/models/invoice/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import Any

from pydantic.v1 import BaseModel
from pydantic import BaseModel

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

version: str
version: int
tag: str
discounted_price: int
percent_kth: int
Expand All @@ -31,27 +31,27 @@ class InvoiceInfo(BaseModel):
"""Class to collect invoice information used in the invoice report."""

name: str
id: str
lims_id: str | None
id: int
lims_id: str | None = None
application_tag: str
project: str
date: Any | None
date: Any | None = None
price: int
priority: PriorityTerms
price_kth: int | None
total_price: int | None
price_kth: int | None = None
total_price: int | None = None


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

cost_center: str
project_number: str | None
project_number: str | None = None
customer_id: str
customer_name: str
agreement: str | None
agreement: str | None = None
invoice_id: int
contact: dict
records: list
pooled_samples: Any | None
pooled_samples: Any | None = None
record_type: RecordType

0 comments on commit 17c6fc8

Please sign in to comment.