Changes between Version 7 and Version 8 of ERModel


Ignore:
Timestamp:
08/13/25 15:40:52 (8 weeks ago)
Author:
163080
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ERModel

    v7 v8  
    99- company_id: Numeric, primary key.
    1010- company_name: Text, required.
    11 - address: Text, optional.
    12 - vat: Text, optional.
    13 - email: Text, required.
     11- company_street: Text, optional.
     12- company_city: Text, optional.
     13- company_state: Text, optional.
     14- company_zip: Text, optional.
     15- company_vat: Text, optional.
     16- company_email: Text, required.
    1417- created_at: Date, required.
    1518- updated_at: Date, required.
     
    2326- user_email: Text, unique, required.
    2427- password: Text, required.
    25 - role: Enum (Admin, HR, Finance Manager), required.
     28- user_role: Enum (Admin, HR, Finance Manager), required.
    2629- company_id: Foreign key to Company.
    2730- created_at: Date, required.
     
    3538- employee_name: Text, required.
    3639- employee_email: Text, unique, required.
    37 - status: Enum (Active, Inactive, Terminated), required.
    38 - iban: Text, optional.
    39 - cv: Text, optional (file path or URL).
    40 - photo: Text, optional (file path or URL).
    41 - notes: Text, optional.
    42 - project: Text, optional.
     40- employee_role: Text, optional.
     41- employee_status: Enum (Active, Inactive, Terminated), required.
     42- employee_street: Text, optional.
     43- employee_city: Text, optional.
     44- employee_state: Text, optional.
     45- employee_zip: Text, optional.
     46- employee_iban: Text, optional.
     47- employee_bank_name: Text, optional.
     48- employee_swift: Text, optional.
     49- employee_cv_ref: Text, optional (file path or URL).
     50- employee_photo_ref: Text, optional (file path or URL).
    4351- company_id: Foreign key to Company.
    4452- created_at: Date, required.
     
    5260- candidate_name: Text, required.
    5361- candidate_email: Text, unique, required.
    54 - status: Enum (Applied, Interview, Offered, Rejected), required.
    55 - cv: Text, optional (file path or URL).
    56 - interview_stage: Text, optional.
    57 - notes: Text, optional.
     62- candidate_status: Enum (Applied, Interview, Offered, Rejected), required.
     63- candidate_cv_ref: Text, optional (file path or URL).
     64- candidate_stage: Text, optional.
     65- candidate_notes: Text, optional.
    5866- company_id: Foreign key to Company.
    5967- created_at: Date, required.
     
    6876- client_representative: Text, required.
    6977- client_email: Text, unique, required.
    70 - phone: Text, optional.
    71 - address: Text, optional.
    72 - vat: Text, optional.
    73 - logo: Text, optional (file path or URL).
     78- client_street: Text, optional.
     79- client_city: Text, optional.
     80- client_state: Text, optional.
     81- client_zip: Text, optional.
     82- client_vat: Text, optional.
     83- client_logo_url: Text, optional (file path or URL).
    7484- company_id: Foreign key to Company.
    7585- created_at: Date, required.
     
    8191Attributes:
    8292- invoice_id: Numeric, primary key.
    83 - from: Text, required (company details).
    84 - to: Text, required (client details).
    85 - issue_date: Date, required.
    86 - due_date: Date, required.
    87 - notes: Text, optional.
    88 - status: Enum (Draft, Pending, Paid, Overdue), required.
     93- invoice_no: Numeric, required.
     94- invoice_issue_date: Date, required.
     95- invoice_due_date: Date, required.
     96- invoice_notes: Text, optional.
     97- invoice_status: Enum (Draft, Pending, Paid, Overdue), required.
    8998- company_id: Foreign key to Company.
    9099- client_id: Foreign key to Client.
     
    96105
    97106Attributes:
    98 - line_item_id: Numeric, primary key.
     107- item_id: Numeric, primary key.
    99108- description: Text, required.
    100109- quantity: Integer, required.
     
    118127= Relations
    119128
    120 - Company ↔ User (company_user): A company has many users; each user belongs to one company.
    121 - Company ↔ Employee (company_employee): A company has many employees; each employee belongs to one company.
    122 - Company ↔ Candidate (company_candidate): A company has many candidates; each candidate belongs to one company.
    123 - Company ↔ Client (company_client): A company has many clients; each client belongs to one company.
    124 - Company ↔ Invoice (company_invoice): A company generates many invoices; each invoice belongs to one company.
    125 - Client ↔ Invoice (client_invoice): A client can have many invoices; each invoice is addressed to one client.
    126 - Invoice ↔ LineItem (invoice_lineitem): An invoice has multiple line items; each line item belongs to one invoice.
    127 - Company ↔ EmailTemplate (company_emailtemplate): A company has multiple email templates; each template belongs to one company.
     129- Company ↔ User (company_manages_user): A company has many users; each user belongs to one company.
     130- Company ↔ Employee (company_employs_employee): A company has many employees; each employee belongs to one company.
     131- Company ↔ Candidate (company_screens_candidate): A company has many candidates; each candidate belongs to one company.
     132- Company ↔ Client (company_owns_client): A company has many clients; each client belongs to one company.
     133- Company ↔ Invoice (company_issues_invoice): A company generates many invoices; each invoice belongs to one company.
     134- Client ↔ Invoice (client_receives_invoice): A client can have many invoices; each invoice is addressed to one client.
     135- Invoice ↔ LineItem (invoice_contains_item): An invoice has multiple line items; each line item belongs to one invoice.
     136- Company ↔ EmailTemplate (company_creates_template): A company has multiple email templates; each template belongs to one company.