Changes between Version 7 and Version 8 of ERModel


Ignore:
Timestamp:
12/01/26 21:53:29 (9 hours ago)
Author:
233171
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ERModel

    v7 v8  
    11= Концептуален дизајн - ЕР Дијаграм =
    2 [wiki:WikiStart ← Назад кон почетната страница]
    32
    43== Дијаграм ==
    … …  
    1110
    1211 * Customers – ентитет кој чува податоци за нарачателите на превоз (директни клиенти и брокери).
    13    * customer_id (bigint)
     12   * __customer_id__ (bigint)
    1413   * name (text, not null)
    1514   * type (text, not null)
    … …  
    1716   * payment_terms_days (integer, not null)
    1817 * Orders – ентитет кој чува податоци за нарачките за превоз.
    19    * order_id (bigint)
     18   * __order_id__ (bigint)
    2019   * order_no (text, not null, unique)
    2120   * order_date (date, not null)
    2221   * status (text, not null)
    2322 * Loads – слаб ентитет кој чува податоци за товарите во рамки на една нарачка.
    24    * order_id* (bigint)
    25    * load_no (integer)
     23   * __order_id*__ (bigint)
     24   * __load_no__ (integer)
    2625   * cargo_description (text, not null)
    2726   * weight_kg (numeric, not null)
    … …  
    2928   * status (text, not null)
    3029 * Shipments – слаб ентитет кој чува податоци за пратките од кои се состои товарот.
    31    * order_id* (bigint)
    32    * load_no* (integer)
    33    * shipment_no (integer)
     30   * __order_id*__ (bigint)
     31   * __load_no*__ (integer)
     32   * __shipment_no__ (integer)
    3433   * description (text, not null)
    3534   * weight_kg (numeric, not null)
    3635   * status (text, not null)
    3736 * Stops – слаб ентитет кој чува податоци за постојките за утовар и истовар на товарот.
    38    * order_id* (bigint)
    39    * load_no* (integer)
    40    * seq_no (integer)
     37   * __order_id*__ (bigint)
     38   * __load_no*__ (integer)
     39   * __seq_no__ (integer)
    4140   * stop_type (text, not null)
    4241   * planned_time (timestamp, not null)
    4342   * actual_time (timestamp)
    4443 * Locations – ентитет кој чува податоци за местата за утовар и истовар (магацини, фабрики, терминали).
    45    * location_id (bigint)
     44   * __location_id__ (bigint)
    4645   * name (text, not null)
    4746   * city (text, not null)
    4847   * country (text, not null)
    4948 * __!StatusHistory__ – слаб ентитет кој чува податоци за промените на статусот на товарот.
    50    * order_id* (bigint)
    51    * load_no* (integer)
    52    * changed_at (timestamp)
     49   * __order_id*__ (bigint)
     50   * __load_no*__ (integer)
     51   * __changed_at__ (timestamp)
    5352   * status (text, not null)
    5453   * note (text)
    5554 * Assignments – ентитет кој чува податоци за доделувањето на товар на возач, камион и приколка.
    56    * assignment_id (bigint)
     55   * __assignment_id__ (bigint)
    5756   * planned_start (timestamp, not null)
    5857   * planned_end (timestamp, not null)
    5958   * status (text, not null)
    6059 * Drivers – ентитет кој чува податоци за возачите на фирмата.
    61    * driver_id (bigint)
     60   * __driver_id__ (bigint)
    6261   * first_name (text, not null)
    6362   * last_name (text, not null)
    … …  
    6564   * status (text, not null)
    6665 * __!DriverDocuments__ – слаб ентитет кој чува податоци за документите на возачите и нивниот рок на важност.
    67    * driver_id* (bigint)
    68    * doc_no (text)
     66   * __driver_id*__ (bigint)
     67   * __doc_no__ (text)
    6968   * doc_type (text, not null)
    7069   * expires_on (date, not null)
    7170 * Vehicles – ентитет кој чува податоци за возилата (камиони и приколки).
    72    * vehicle_id (bigint)
     71   * __vehicle_id__ (bigint)
    7372   * plate (text, not null, unique)
    7473   * vin (text, not null, unique)
    … …  
    7675   * status (text, not null)
    7776 * __!VehicleDocuments__ – слаб ентитет кој чува податоци за документите на возилата и нивниот рок на важност.
    78    * vehicle_id* (bigint)
    79    * doc_no (text)
     77   * __vehicle_id*__ (bigint)
     78   * __doc_no__ (text)
    8079   * doc_type (text, not null)
    8180   * expires_on (date, not null)
    8281 * Expenses – ентитет кој чува заеднички податоци за секој трошок на возило (гориво, сервис или патарина).
    83    * expense_id (bigint)
     82   * __expense_id__ (bigint)
    8483   * expense_date (date, not null)
    8584   * amount (numeric, not null)
    8685   * note (text)
    8786 * __!FuelEntries__ – ентитет кој чува податоци за точењата гориво.
    88    * expense_id* (bigint)
     87   * __expense_id*__ (bigint)
    8988   * liters (numeric, not null)
    9089   * price_per_liter (numeric, not null)
    9190   * odometer_km (integer, not null)
    9291 * Services – ентитет кој чува податоци за сервисите и поправките на возилата.
    93    * expense_id* (bigint)
     92   * __expense_id*__ (bigint)
    9493   * service_type (text, not null)
    9594   * workshop (text, not null)
    9695   * odometer_km (integer, not null)
    9796 * Tolls – ентитет кој чува податоци за платените патарини.
    98    * expense_id* (bigint)
     97   * __expense_id*__ (bigint)
    9998   * road_section (text, not null)
    10099   * country (text, not null)
    101100 * Invoices – ентитет кој чува податоци за фактурите кон нарачателите.
    102    * invoice_id (bigint)
     101   * __invoice_id__ (bigint)
    103102   * invoice_no (text, not null, unique)
    104103   * issue_date (date, not null)
    105104   * due_date (date, not null)
    106105 * Payments – ентитет кој чува податоци за уплатите по фактурите.
    107    * payment_id (bigint)
     106   * __payment_id__ (bigint)
    108107   * payment_date (date, not null)
    109108   * amount (numeric, not null)
    110109   * method (text, not null)
    111110 * Users – ентитет кој чува информации за корисничките сметки на вработените.
    112    * user_id (bigint)
     111   * __user_id__ (bigint)
    113112   * username (text, not null, unique)
    114113   * email (text, not null, unique)
    115114 * Roles – ентитет кој чува податоци за улогите на корисниците (диспечер, сметководител, менаџер, администратор).
    116    * role_id (bigint)
     115   * __role_id__ (bigint)
    117116   * name (text, not null, unique)
    118117
    119 Expenses е надтип на __!FuelEntries__, Services и Tolls (дисјунктна, тотална специјализација). Атрибутите означени со * се клучеви наследени од сопственикот (кај слабите ентитети) или од надтипот.
     118Expenses е надтип на __!FuelEntries__, Services и Tolls (дисјунктна, тотална специјализација). Подвлечените атрибути го сочинуваат примарниот клуч; атрибутите означени со * се наследени од сопственикот (кај слабите ентитети) или од надтипот.
    120119
    121120=== Релации ===