---
tags: [inventory, model]
module: Inventory
---

# [Model]Warehouse

## Connections
[[_Inventory]] · [[[Model]Requisition]] · [[[Model]WarehouseProductLog]] · [[[Controller]WarehouseController]] · [[[Service]WarehouseServices]] · [[[Repo]Repositories]] · [[[Policy]Policies]] · [[[Cross]CrossModuleDependencies]]

## Source
`Modules/Inventory/Models/Warehouse.php`

## Responsibilities
- Physical storage location
- Parent-child hierarchy (parent_warehouse_id self-ref)
- One main warehouse active at a time (is_main flag; StoringWarehouseService unsets others)
- Linked to CostCenter (Products) and Account (Accounting)
- Tenant-specific (UsesTenantConnection), Auditable, SoftDeletes

## Key Relationships
| Relation | Type | Target |
|---|---|---|
| parent | belongsTo | [[[Model]Warehouse]] (self) |
| costCenter | belongsTo | CostCenter (Products module) |
| account | belongsTo | [[[Model]Account]] (Accounting) |
| createdBy | belongsTo | [[[Model]User]] (CompanyUser) |
| warehouseProducts | hasMany | WarehouseProduct (Products module) |

## Appended Attributes
`status_label` · `formatted_created_at` · `can_be_deleted` · `short_title`

## Scopes
`Main()` — filters is_main = true
