Store
The Store entity, mapped to the store table.
| Table | store |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 9 |
| Relationships | 0 |
| Source | backend/src/main/java/com/motorph/payroll/model/Store.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
storeId | Integer | store_id | — | primary key, generated |
name | String | name | — | — |
address | String | address | Yes | — |
contactPerson | String | contact_person | Yes | — |
contactPhone | String | contact_phone | Yes | — |
contactEmail | String | contact_email | Yes | — |
status | String | status | — | — |
createdAt | LocalDateTime | created_at | — | — |
updatedAt | LocalDateTime | updated_at | — | — |
Plus tenant_id, inherited from TenantOwned. Hibernate stamps it on insert and adds where tenant_id = ? to every query, so it is never written or read by application code.
Referenced by
| Entity | Field | Kind |
|---|---|---|
| StoreInventory | store | @ManyToOne |
Neighbourhood
Repository
StoreRepository
Declared over Store with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/StoreRepository.java
| Method | Returns | Notes |
|---|---|---|
existsByName(String name) | boolean | derived |
existsByNameAndStoreIdNot(String name, Integer storeId) | boolean | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over Store.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| StoreController | /api/inventory/stores | 7 | Inventory & Portal |
Generated page
This page is rebuilt from the source on every docs build by docs-site/scripts/gen-code-wiki.mjs. Editing it has no effect — change the code, or, if what you want to say is prose, write it in docs/.