/**
 * Address domain model.
 */

export interface Address {
  id: string;
  userId: string;
  label: string | null;
  recipientName: string;
  street: string;
  city: string;
  postalCode: string;
  country: string;
  isDefault: boolean;
  createdAt: Date;
  updatedAt: Date;
}

export interface NewAddress {
  label?: string | null;
  recipientName: string;
  street: string;
  city: string;
  postalCode: string;
  country: string;
  isDefault?: boolean;
}

/** Fields an address update may set. Undefined = leave unchanged. */
export type AddressPatch = Partial<NewAddress>;
