Initial import NDC_1C
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class EntityLink(BaseModel):
|
||||
relation: str
|
||||
target_entity: str
|
||||
target_id: str
|
||||
source_field: str | None = None
|
||||
|
||||
|
||||
class CanonicalEntity(BaseModel):
|
||||
source_entity: str
|
||||
source_id: str
|
||||
display_name: str
|
||||
attributes: dict[str, Any] = Field(default_factory=dict)
|
||||
links: list[EntityLink] = Field(default_factory=list)
|
||||
|
||||
|
||||
class Organization(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Counterparty(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Contract(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Account(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Subconto(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class ResponsiblePerson(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Currency(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Warehouse(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class CashflowArticle(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Department(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Individual(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Item(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class BankAccount(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Document(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class InvoiceDocument(Document):
|
||||
pass
|
||||
|
||||
|
||||
class Posting(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class RegisterMovement(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class RegisterRecord(CanonicalEntity):
|
||||
pass
|
||||
|
||||
|
||||
class Period(CanonicalEntity):
|
||||
pass
|
||||
Reference in New Issue
Block a user