| | 1 | = Entity Sets |
| | 2 | |
| | 3 | - Company(company_id, name, address, vat, email, created_at, updated_at) |
| | 4 | |
| | 5 | - User(user_id, name, email, password, role, company_id) |
| | 6 | *Reference: company_id → Company(company_id) |
| | 7 | |
| | 8 | - Employee(employee_id, name, email, status, iban, cv, photo, notes, project, company_id) |
| | 9 | *Reference: company_id → Company(company_id) |
| | 10 | |
| | 11 | - Candidate(candidate_id, name, email, status, cv, interview_stage, notes, company_id) |
| | 12 | *Reference: company_id → Company(company_id) |
| | 13 | |
| | 14 | - Client(client_id, name, representative, email, phone, address, vat, logo, company_id) |
| | 15 | *Reference: company_id → Company(company_id) |
| | 16 | |
| | 17 | - Invoice(invoice_id, from, to, issue_date, due_date, notes, status, company_id, client_id) |
| | 18 | *References: |
| | 19 | company_id → Company(company_id) |
| | 20 | client_id → Client(client_id) |
| | 21 | |
| | 22 | - LineItem(line_item_id, description, quantity, unit_price, currency, total, invoice_id) |
| | 23 | Reference: invoice_id → Invoice(invoice_id) |
| | 24 | |
| | 25 | - EmailTemplate(template_id, type, subject, body, company_id) |
| | 26 | *Reference: company_id → Company(company_id) |
| | 27 | |
| | 28 | = Relationship Sets Between Entities |
| | 29 | |
| | 30 | - Employee_Belongs_To_Company(employee_id, company_id) |
| | 31 | References: |
| | 32 | employee_id → Employee(employee_id) |
| | 33 | company_id → Company(company_id) |
| | 34 | |
| | 35 | - Candidate_Belongs_To_Company(candidate_id, company_id) |
| | 36 | References: |
| | 37 | candidate_id → Candidate(candidate_id) |
| | 38 | company_id → Company(company_id) |
| | 39 | |
| | 40 | - Client_Belongs_To_Company(client_id, company_id) |
| | 41 | References: |
| | 42 | client_id → Client(client_id) |
| | 43 | company_id → Company(company_id) |
| | 44 | |
| | 45 | - Invoice_Belongs_To_Client(invoice_id, client_id) |
| | 46 | References: |
| | 47 | invoice_id → Invoice(invoice_id) |
| | 48 | client_id → Client(client_id) |
| | 49 | |
| | 50 | - Invoice_Belongs_To_Company(invoice_id, company_id) |
| | 51 | References: |
| | 52 | invoice_id → Invoice(invoice_id) |
| | 53 | company_id → Company(company_id) |
| | 54 | |
| | 55 | - LineItem_Belongs_To_Invoice(line_item_id, invoice_id) |
| | 56 | References: |
| | 57 | line_item_id → LineItem(line_item_id) |
| | 58 | invoice_id → Invoice(invoice_id) |
| | 59 | |
| | 60 | - User_Belongs_To_Company(user_id, company_id) |
| | 61 | References: |
| | 62 | user_id → User(user_id) |
| | 63 | company_id → Company(company_id) |
| | 64 | |
| | 65 | - EmailTemplate_Belongs_To_Company(template_id, company_id) |
| | 66 | References: |
| | 67 | template_id → EmailTemplate(template_id) |
| | 68 | company_id → Company(company_id) |