| | 1 | = DatabaseCreation: MajStore |
| | 2 | |
| | 3 | == Ознаки |
| | 4 | |
| | 5 | Примарните клучеви се означени со bold |
| | 6 | |
| | 7 | Надворешните клучеви се означени со FK* за кои во заграда () е напишана табелата која ја референцираат. |
| | 8 | |
| | 9 | |
| | 10 | == Табели |
| | 11 | |
| | 12 | === Пермисии |
| | 13 | |
| | 14 | Permission (**permission_id**, permission_name, description) |
| | 15 | |
| | 16 | Role (**role_id**, role_name) |
| | 17 | |
| | 18 | Role_Permission (**role_permission_id**, role_id*(Role), permission_id*(Permission)) |
| | 19 | |
| | 20 | === Корисници |
| | 21 | |
| | 22 | User (**user_id**, first_name, last_name, username, email, password_hash) |
| | 23 | |
| | 24 | User_Role (**user_role_id**, role_id*(Role), user_id*(User)) |
| | 25 | |
| | 26 | ---- |
| | 27 | |
| | 28 | Notification (**notification_id**, message, is_read, created_at, user_id*(User)) |
| | 29 | |
| | 30 | Location (**location_id**, city, region, address) |
| | 31 | |
| | 32 | === Мајстори |
| | 33 | |
| | 34 | Worker (**worker_id**, bio, works_remote, location_id*(Location), user_id*(User)) |
| | 35 | |
| | 36 | Calendar (**calendar_id**, worker_id*(Worker)) |
| | 37 | |
| | 38 | Day (**day_id**, day_name) |
| | 39 | |
| | 40 | Work_Day (**work_day_id**, start_time, end_time, calendar_id*(Calendar), day_id*(Day)) |
| | 41 | |
| | 42 | Calendar_Event (**event_id**, title, description, start_time, end_time, calendar_id*(Calendar)) |
| | 43 | |
| | 44 | Certificate (**certificate_id**, certificate_name, issuer, worker_id*(Worker)) |
| | 45 | |
| | 46 | Specialty (**specialty_id**, specialty_name) |
| | 47 | |
| | 48 | Worker_Specialty (**worker_specialty_id**, worker_id*(Worker), specialty_id*(Specialty)) |
| | 49 | |
| | 50 | === Постови |
| | 51 | |
| | 52 | Post_Status (**status_id**, status_name) |
| | 53 | |
| | 54 | Post (**post_id**, title, description, created_at, user_id*(User), location_id*(Location), status_id*(Post_Status)) |
| | 55 | |
| | 56 | Post_Image (**image_id**, image_file, post_id*(Post)) |
| | 57 | |
| | 58 | Post_Specialty (**post_specialty_id**, post_id*(Post), specialty_id*(Specialty)) |
| | 59 | |
| | 60 | === Апликации |
| | 61 | |
| | 62 | Application_Status (**status_id**, status_name) |
| | 63 | |
| | 64 | Application (**application_id**, message, needed_time, created_at, worker_id*(Worker), post_id*(Post), status_id*(Application_Status)) |
| | 65 | |
| | 66 | === Рецензии |
| | 67 | |
| | 68 | Review (**review_id**, grade, created_at, reviewer_id*(User), worker_specialty_id*(Worker_Specialty)) |
| | 69 | |
| | 70 | Review_Comment (**comment_id**, review_id*(Review), reply) |
| | 71 | |
| | 72 | === Премиум планови |
| | 73 | |
| | 74 | Payment_Method (**method_id**, method_name, max_amount, tax) |
| | 75 | |
| | 76 | Worker_Method (**worker_method_id**, worker_id*(Worker), method_id*(Payment_Method)) |
| | 77 | |
| | 78 | Payment_Status (**status_id**, status_name) |
| | 79 | |
| | 80 | Premium_Plan (plan_id, name, price, duration_days, description) |
| | 81 | |
| | 82 | Payment (**payment_id**, amount, payment_date, worker_method_id*(Worker_Method), payment_status*(Payment_Status), plan_id*(Premium_Plan)) |
| | 83 | |
| | 84 | Premium_Worker (**premium_id**, start_date, end_date, plan_id*(Premium_Plan), worker_id*(Worker), payment_id*(Payment)) |
| | 85 | |
| | 86 | |
| | 87 | == DDL скрипта креирање на табелите |
| | 88 | |
| | 89 | [MajStore_DDL.sql] |
| | 90 | |
| | 91 | == DDL скрипта бришење на табелите |
| | 92 | |
| | 93 | [MajStore_DDL_delete.sql] |
| | 94 | |
| | 95 | == DML скрипта за полнење на табелите со податоци |
| | 96 | |
| | 97 | [MajStore_DML.sql] |