# Address

**Kind:** Class

**Source:** `Frontend/src/app/models/common/address.model.ts` (line 6)

**Part of:** [Frontend](subsystem-frontend-src-app)

`Address` is a shared frontend model for representing address data in the application. Its `clone()` method creates a separate `Address` instance so callers can work with a copy without changing the original model.

## Methods

| Method | Signature | Returns |
|---|---|---|
| `clone` | `clone(ad: Address)` | `void` |

## Properties

| Property | Type |
|---|---|
| `AddressID` | `number` |
| `AddressLine` | `string` |
| `CountryCode` | `string` |
| `CountryName` | `string` |
| `Destination` | `string` |
| `City` | `string` |
| `State` | `string` |
| `PostalCode` | `string` |
| `ZipCode` | `string` |
| `RowGuid` | `string` |
| `AddressTypeID` | `number` |
| `GovernateID` | `number` |
| `HasMarker` | `boolean` |
| `latitude` | `number` |
| `longitude` | `number` |
| `RelatedToID` | `number` |
| `RelatedTypeID` | `number` |
| `_RelatedToName` | `string` |

## Diagram

```mermaid
graph LR
  A[Address instance] --> B[clone()]
  B --> C[New Address instance]
```

## Usage

```ts
import { Address } from '@/app/models/common/address.model';

const address = new Address();

// Create an independent copy before making changes.
const editableAddress = address.clone();

// Changes to editableAddress can be handled separately from address.
```

## AI Coding Instructions

- Use `clone()` before editing address data that may also be referenced by existing UI state.
- Treat the result of `clone()` as a separate `Address` instance rather than modifying the source instance.
- Keep address-related shared model logic in `models/common` when it is used across frontend features.
- Check the `Address` model definition before adding or copying fields so cloning behavior remains aligned with the class.

## Used by

25 references from 25 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (25)

- `BranchDetailsComponent` — `Frontend/src/app/components/configuration/company/main-branch/branch-details.component.ts`:1
- `NewBranchComponent` — `Frontend/src/app/components/configuration/company/main-branch/new.branch.component.ts`:1
- `WarehouseConfigDetailsComponent` — `Frontend/src/app/components/configuration/company/warehouse/warehouse-config-details/warehouse-config-details.component.ts`:1
- `AccountDetailsComponent` — `Frontend/src/app/components/market/account-details/account-details.component.ts`:1
- `OrderPanelDetailsComponent` — `Frontend/src/app/components/sales/new-job/order-panel-details/order-panel-details.component.ts`:1
- `AddressComponent` — `Frontend/src/app/components/shared/address/address.component.ts`:1
- `LocationDropdownComponent` — `Frontend/src/app/components/shared/dropdown/location-dropdown/location-dropdown.component.ts`:1
- `DeliveryNoteDetailsComponent` — `Frontend/src/app/components/warehouse/delivery-note-details/delivery-note-details.component.ts`:1

…and 17 more.
