Changes between Version 7 and Version 8 of ERModel
- Timestamp:
- 12/01/26 21:53:29 (9 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ERModel
v7 v8 1 1 = Концептуален дизајн - ЕР Дијаграм = 2 [wiki:WikiStart ← Назад кон почетната страница]3 2 4 3 == Дијаграм == … … 11 10 12 11 * Customers – ентитет кој чува податоци за нарачателите на превоз (директни клиенти и брокери). 13 * customer_id(bigint)12 * __customer_id__ (bigint) 14 13 * name (text, not null) 15 14 * type (text, not null) … … 17 16 * payment_terms_days (integer, not null) 18 17 * Orders – ентитет кој чува податоци за нарачките за превоз. 19 * order_id(bigint)18 * __order_id__ (bigint) 20 19 * order_no (text, not null, unique) 21 20 * order_date (date, not null) 22 21 * status (text, not null) 23 22 * Loads – слаб ентитет кој чува податоци за товарите во рамки на една нарачка. 24 * order_id*(bigint)25 * load_no(integer)23 * __order_id*__ (bigint) 24 * __load_no__ (integer) 26 25 * cargo_description (text, not null) 27 26 * weight_kg (numeric, not null) … … 29 28 * status (text, not null) 30 29 * 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) 34 33 * description (text, not null) 35 34 * weight_kg (numeric, not null) 36 35 * status (text, not null) 37 36 * 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) 41 40 * stop_type (text, not null) 42 41 * planned_time (timestamp, not null) 43 42 * actual_time (timestamp) 44 43 * Locations – ентитет кој чува податоци за местата за утовар и истовар (магацини, фабрики, терминали). 45 * location_id(bigint)44 * __location_id__ (bigint) 46 45 * name (text, not null) 47 46 * city (text, not null) 48 47 * country (text, not null) 49 48 * __!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) 53 52 * status (text, not null) 54 53 * note (text) 55 54 * Assignments – ентитет кој чува податоци за доделувањето на товар на возач, камион и приколка. 56 * assignment_id(bigint)55 * __assignment_id__ (bigint) 57 56 * planned_start (timestamp, not null) 58 57 * planned_end (timestamp, not null) 59 58 * status (text, not null) 60 59 * Drivers – ентитет кој чува податоци за возачите на фирмата. 61 * driver_id(bigint)60 * __driver_id__ (bigint) 62 61 * first_name (text, not null) 63 62 * last_name (text, not null) … … 65 64 * status (text, not null) 66 65 * __!DriverDocuments__ – слаб ентитет кој чува податоци за документите на возачите и нивниот рок на важност. 67 * driver_id*(bigint)68 * doc_no(text)66 * __driver_id*__ (bigint) 67 * __doc_no__ (text) 69 68 * doc_type (text, not null) 70 69 * expires_on (date, not null) 71 70 * Vehicles – ентитет кој чува податоци за возилата (камиони и приколки). 72 * vehicle_id(bigint)71 * __vehicle_id__ (bigint) 73 72 * plate (text, not null, unique) 74 73 * vin (text, not null, unique) … … 76 75 * status (text, not null) 77 76 * __!VehicleDocuments__ – слаб ентитет кој чува податоци за документите на возилата и нивниот рок на важност. 78 * vehicle_id*(bigint)79 * doc_no(text)77 * __vehicle_id*__ (bigint) 78 * __doc_no__ (text) 80 79 * doc_type (text, not null) 81 80 * expires_on (date, not null) 82 81 * Expenses – ентитет кој чува заеднички податоци за секој трошок на возило (гориво, сервис или патарина). 83 * expense_id(bigint)82 * __expense_id__ (bigint) 84 83 * expense_date (date, not null) 85 84 * amount (numeric, not null) 86 85 * note (text) 87 86 * __!FuelEntries__ – ентитет кој чува податоци за точењата гориво. 88 * expense_id*(bigint)87 * __expense_id*__ (bigint) 89 88 * liters (numeric, not null) 90 89 * price_per_liter (numeric, not null) 91 90 * odometer_km (integer, not null) 92 91 * Services – ентитет кој чува податоци за сервисите и поправките на возилата. 93 * expense_id*(bigint)92 * __expense_id*__ (bigint) 94 93 * service_type (text, not null) 95 94 * workshop (text, not null) 96 95 * odometer_km (integer, not null) 97 96 * Tolls – ентитет кој чува податоци за платените патарини. 98 * expense_id*(bigint)97 * __expense_id*__ (bigint) 99 98 * road_section (text, not null) 100 99 * country (text, not null) 101 100 * Invoices – ентитет кој чува податоци за фактурите кон нарачателите. 102 * invoice_id(bigint)101 * __invoice_id__ (bigint) 103 102 * invoice_no (text, not null, unique) 104 103 * issue_date (date, not null) 105 104 * due_date (date, not null) 106 105 * Payments – ентитет кој чува податоци за уплатите по фактурите. 107 * payment_id(bigint)106 * __payment_id__ (bigint) 108 107 * payment_date (date, not null) 109 108 * amount (numeric, not null) 110 109 * method (text, not null) 111 110 * Users – ентитет кој чува информации за корисничките сметки на вработените. 112 * user_id(bigint)111 * __user_id__ (bigint) 113 112 * username (text, not null, unique) 114 113 * email (text, not null, unique) 115 114 * Roles – ентитет кој чува податоци за улогите на корисниците (диспечер, сметководител, менаџер, администратор). 116 * role_id(bigint)115 * __role_id__ (bigint) 117 116 * name (text, not null, unique) 118 117 119 Expenses е надтип на __!FuelEntries__, Services и Tolls (дисјунктна, тотална специјализација). Атрибутите означени со * се клучевинаследени од сопственикот (кај слабите ентитети) или од надтипот.118 Expenses е надтип на __!FuelEntries__, Services и Tolls (дисјунктна, тотална специјализација). Подвлечените атрибути го сочинуваат примарниот клуч; атрибутите означени со * се наследени од сопственикот (кај слабите ентитети) или од надтипот. 120 119 121 120 === Релации ===
