Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 156 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,162 @@
# codbex-partners
Partners Management Application
# <img src="https://www.codbex.com/icon.svg" width="32" style="vertical-align: middle;"> codbex-partners

### Model
## 📖 Table of Contents
* [🗺️ Entity Data Model (EDM)](#️-entity-data-model-edm)
* [🧩 Core Entities](#-core-entities)
* [📦 Dependencies](#-dependencies)
* [🐳 Local Development with Docker](#-local-development-with-docker)

![model](images/partners-model.png)
## 🗺️ Entity Data Model (EDM)

## Local Development with Docker
![model](images/model.png)

## 🧩 Core Entities

### Entity: `Customer`

| Field | Type | Details | Description |
| ----------------- | --------- | -------------------- | ----------------------------------- |
| Id | INTEGER | PK, Identity | Unique identifier for the customer. |
| FirstName | VARCHAR | Length: 50, Nullable | Customer first name. |
| LastName | VARCHAR | Length: 50, Nullable | Customer last name. |
| LegalEntityName | VARCHAR | Length: 255, Nullable | Legal entity name. |
| Name | VARCHAR | Calculated, Length: 255 | Display name. |
| Email | VARCHAR | Length: 100, Unique, Not Null | Email address. |
| Phone | VARCHAR | Length: 15, Not Null | Phone number. |
| Fax | VARCHAR | Length: 20 | Fax number. |
| Country | INTEGER | FK, Not Null | Reference to country. |
| City | INTEGER | FK, Not Null | Reference to city. |
| Address | VARCHAR | Length: 255, Not Null | Address. |
| PostalCode | VARCHAR | Length: 10, Not Null | Postal code. |
| TIN | VARCHAR | Length: 15, Unique, Not Null | Tax identification number. |
| IBAN | VARCHAR | Length: 34, Unique, Not Null | Bank account IBAN. |
| ResponsiblePerson | INTEGER | FK, Not Null | Reference to employee. |
| Identifier | VARCHAR | Length: 36, Unique, Not Null | External identifier. |
| CreatedAt | TIMESTAMP | Audit, Nullable | Creation timestamp. |
| CreatedBy | VARCHAR | Audit, Length: 20, Nullable | Creator. |
| UpdatedAt | TIMESTAMP | Audit, Nullable | Last update timestamp. |
| UpdatedBy | VARCHAR | Audit, Length: 20, Nullable | Last updater. |

### Entity: `Supplier`

| Field | Type | Details | Description |
| --------------- | --------- | -------------------- | ------------------ |
| Id | INTEGER | PK, Identity | Unique identifier. |
| FirstName | VARCHAR | Length: 50, Nullable | First name. |
| LastName | VARCHAR | Length: 50, Nullable | Last name. |
| LegalEntityName | VARCHAR | Length: 255, Nullable | Legal entity name. |
| Name | VARCHAR | Calculated, Length: 255 | Display name. |
| Email | VARCHAR | Length: 100, Unique, Not Null | Email. |
| Phone | VARCHAR | Length: 15, Not Null | Phone. |
| Fax | VARCHAR | Length: 20, Not Null | Fax. |
| TIN | VARCHAR | Length: 15, Unique, Not Null | Tax ID. |
| IBAN | VARCHAR | Length: 34, Unique, Not Null | IBAN. |
| CreatedAt | TIMESTAMP | Audit, Nullable | Created at. |
| CreatedBy | VARCHAR | Audit, Length: 20, Nullable | Created by. |
| UpdatedAt | TIMESTAMP | Audit, Nullable | Updated at. |
| UpdatedBy | VARCHAR | Audit, Length: 20, Nullable | Updated by. |

### Entity `Manufacturer`

| Field | Type | Details | Description |
| --------------- | --------- | -------------------- | ------------------ |
| Id | INTEGER | PK, Identity | Unique identifier. |
| FirstName | VARCHAR | Length: 50, Nullable | First name. |
| LastName | VARCHAR | Length: 50, Nullable | Last name. |
| LegalEntityName | VARCHAR | Length: 255, Nullable | Legal entity name. |
| Name | VARCHAR | Calculated, Length: 255 | Display name. |
| Email | VARCHAR | Length: 100, Unique, Not Null | Email. |
| Phone | VARCHAR | Length: 15, Not Null | Phone. |
| Fax | VARCHAR | Length: 20, Not Null | Fax. |
| TIN | VARCHAR | Length: 15, Unique, Not Null | Tax ID. |
| IBAN | VARCHAR | Length: 34, Unique, Not Null | IBAN. |
| CreatedAt | TIMESTAMP | Audit, Nullable | Created at. |
| CreatedBy | VARCHAR | Audit, Length: 20, Nullable | Created by. |
| UpdatedAt | TIMESTAMP | Audit, Nullable | Updated at. |
| UpdatedBy | VARCHAR | Audit, Length: 20, Nullable | Updated by. |

### Entity `CustomerNote`

| Field | Type | Details | Description |
| --------- | --------- | -------------------- | ---------------------- |
| Id | INTEGER | PK, Identity | Unique identifier. |
| Customer | INTEGER | FK | Reference to customer. |
| Note | VARCHAR | Length: 5000, Not Null | Note content. |
| CreatedAt | TIMESTAMP | Audit, Nullable | Created at. |
| CreatedBy | VARCHAR | Audit, Length: 20, Nullable | Created by. |
| UpdatedAt | TIMESTAMP | Audit, Nullable | Updated at. |
| UpdatedBy | VARCHAR | Audit, Length: 20, Nullable | Updated by. |

### Entity `SupplierNote`

| Field | Type | Details | Description |
| --------- | --------- | -------------------- | ---------------------- |
| Id | INTEGER | PK, Identity | Unique identifier. |
| Supplier | INTEGER | FK | Reference to supplier. |
| Note | VARCHAR | Length: 5000, Not Null | Note content. |
| CreatedAt | TIMESTAMP | Audit, Nullable | Created at. |
| CreatedBy | VARCHAR | Audit, Length: 20, Nullable | Created by. |
| UpdatedAt | TIMESTAMP | Audit, Nullable | Updated at. |
| UpdatedBy | VARCHAR | Audit, Length: 20, Nullable | Updated by. |

### Entity `ManufacturerNote`

| Field | Type | Details | Description |
| ------------ | --------- | -------------------- | -------------------------- |
| Id | INTEGER | PK, Identity | Unique identifier. |
| Manufacturer | INTEGER | FK | Reference to manufacturer. |
| Note | VARCHAR | Length: 5000, Not Null | Note content. |
| CreatedAt | TIMESTAMP | Audit, Nullable | Created at. |
| CreatedBy | VARCHAR | Audit, Length: 20, Nullable | Created by. |
| UpdatedAt | TIMESTAMP | Audit, Nullable | Updated at. |
| UpdatedBy | VARCHAR | Audit, Length: 20, Nullable | Updated by. |

### Entity `CustomerContact`

| Field | Type | Details | Description |
| ----------- | --------- | -------------------- | ---------------------- |
| Id | INTEGER | PK, Identity | Unique identifier. |
| Customer | INTEGER | FK | Reference to customer. |
| Name | VARCHAR | Length: 255, Not Null | Contact name. |
| Designation | VARCHAR | Length: 255, Not Null | Job title. |
| Email | VARCHAR | Length: 100, Unique, Not Null | Email. |
| Phone | VARCHAR | Length: 15, Not Null | Phone. |
| CreatedAt | TIMESTAMP | Audit, Nullable | Created at. |
| CreatedBy | VARCHAR | Audit, Length: 20, Nullable | Created by. |

### Entity `SupplierContact`

| Field | Type | Details | Description |
| ----------- | --------- | -------------------- | ---------------------- |
| Id | INTEGER | PK, Identity | Unique identifier. |
| Supplier | INTEGER | FK | Reference to supplier. |
| Name | VARCHAR | Length: 255, Not Null | Contact name. |
| Designation | VARCHAR | Length: 255, Not Null | Job title. |
| Email | VARCHAR | Length: 100, Unique, Not Null | Email. |
| Phone | VARCHAR | Length: 15, Not Null | Phone. |
| CreatedAt | TIMESTAMP | Audit, Nullable | Created at. |
| CreatedBy | VARCHAR | Audit, Length: 20, Nullable | Created by. |

### Entity `ManufacturerContact`

| Field | Type | Details | Description |
| ------------ | --------- | -------------------- | -------------------------- |
| Id | INTEGER | PK, Identity | Unique identifier. |
| Manufacturer | INTEGER | FK | Reference to manufacturer. |
| Name | VARCHAR | Length: 255, Not Null | Contact name. |
| Designation | VARCHAR | Length: 255, Not Null | Job title. |
| Email | VARCHAR | Length: 100, Unique, Not Null | Email. |
| Phone | VARCHAR | Length: 15, Not Null | Phone. |
| CreatedAt | TIMESTAMP | Audit, Nullable | Created at. |
| CreatedBy | VARCHAR | Audit, Length: 20, Nullable | Created by. |

## 📦 Dependencies

- [codbex-countries](https://github.com/codbex/codbex-countries)
- [codbex-cities](https://github.com/codbex/codbex-cities)
- [codbex-navigation-groups](https://github.com/codbex/codbex-navigation-groups)

## 🐳 Local Development with Docker

When running this project inside the codbex Atlas Docker image, you must provide authentication for installing dependencies from GitHub Packages.
1. Create a GitHub Personal Access Token (PAT) with `read:packages` scope.
Expand Down
Binary file added images/model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/partners-model.png
Binary file not shown.
Loading