feat(customers): add controlled CSV and XLSX customer import
This commit is contained in:
parent
613ffdc8b7
commit
82e03877b3
566 changed files with 2752 additions and 991 deletions
|
|
@ -17,6 +17,8 @@ class Customer(Base, UUIDMixin, TimestampMixin):
|
|||
__tablename__ = "customers"
|
||||
|
||||
customer_type: Mapped[CustomerType] = mapped_column(Enum(CustomerType))
|
||||
source_system: Mapped[str | None] = mapped_column(String(80), index=True)
|
||||
external_id: Mapped[str | None] = mapped_column(String(120), index=True)
|
||||
name: Mapped[str] = mapped_column(String(220), index=True)
|
||||
street: Mapped[str | None] = mapped_column(String(220))
|
||||
postal_code: Mapped[str | None] = mapped_column(String(20))
|
||||
|
|
@ -29,4 +31,3 @@ class Customer(Base, UUIDMixin, TimestampMixin):
|
|||
|
||||
contacts: Mapped[list["Contact"]] = relationship(back_populates="customer", cascade="all, delete-orphan")
|
||||
locations: Mapped[list["Location"]] = relationship(back_populates="customer", cascade="all, delete-orphan")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue