feat(sync): add company details to customer addresses

Addresses with a company are completed through
GET /customers_addresses/:id (tax number, company number, legal status),
which the customer payload does not embed. Addresses without company get
these fields set to null; a failed call keeps the stored values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MastersGame
2026-11-07 10:48:49 +01:00
parent 9e6e5162ad
commit ad8e39f63c
7 changed files with 172 additions and 23 deletions

View File

@@ -151,19 +151,25 @@ model CustomerAddress {
id String @id @default(uuid())
updatedAt DateTime @updatedAt
address String
city String
company String?
country String
firstName String
hiboutikId Int @unique
isDefault Boolean @default(false)
lastName String
address String
city String
company String?
/// Company registration number (SIRET...), only for an address with a company
companyNumber String?
country String
firstName String
hiboutikId Int @unique
isDefault Boolean @default(false)
lastName String
/// Company legal status (SAS, SARL...), only for an address with a company
legalStatus String?
/// Free complement (building, floor, door code...)
other String?
phone String?
state String?
zipCode String
other String?
phone String?
state String?
/// Company VAT number, only for an address with a company
taxNumber String?
zipCode String
customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)
customerId String