Changes between Version 4 and Version 5 of ERModel


Ignore:
Timestamp:
02/06/25 16:45:14 (2 weeks ago)
Author:
163080
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ERModel

    v4 v5  
    1 [[Image(https://develop.finki.ukim.mk/projects/agency-os/raw-attachment/wiki/ERModel/AgencyOS.webp)]]
     1[[Image(https://develop.finki.ukim.mk/projects/agency-os/raw-attachment/wiki/ERModel/AgencyOS%20(1).webp)]]
    22
    33= Entities
     
    88Attributes:
    99- company_id: Numeric, primary key.
    10 - name: Text, required.
     10- company_name: Text, required.
    1111- address: Text, optional.
    1212- vat: Text, optional.
     
    2020Attributes:
    2121- user_id: Numeric, primary key.
    22 - name: Text, required.
    23 - email: Text, unique, required.
     22- user_name: Text, required.
     23- user_email: Text, unique, required.
    2424- password: Text, required.
    2525- role: Enum (Admin, HR, Finance Manager), required.
     
    3333Attributes:
    3434- employee_id: Numeric, primary key.
    35 - name: Text, required.
    36 - email: Text, unique, required.
     35- employee_name: Text, required.
     36- employee_email: Text, unique, required.
    3737- status: Enum (Active, Inactive, Terminated), required.
    3838- iban: Text, optional.
     
    5050Attributes:
    5151- candidate_id: Numeric, primary key.
    52 - name: Text, required.
    53 - email: Text, unique, required.
     52- candidate_name: Text, required.
     53- candidate_email: Text, unique, required.
    5454- status: Enum (Applied, Interview, Offered, Rejected), required.
    5555- cv: Text, optional (file path or URL).
     
    6565Attributes:
    6666- client_id: Numeric, primary key.
    67 - name: Text, required.
    68 - representative: Text, required.
    69 - email: Text, unique, required.
     67- client_name: Text, required.
     68- client_representative: Text, required.
     69- client_email: Text, unique, required.
    7070- phone: Text, optional.
    7171- address: Text, optional.
     
    118118= Relations
    119119
    120 - Company ↔ User: A company has many users; each user belongs to one company.
    121 - Company ↔ Employee: A company has many employees; each employee belongs to one company.
    122 - Company ↔ Candidate: A company has many candidates; each candidate belongs to one company.
    123 - Company ↔ Client: A company has many clients; each client belongs to one company.
    124 - Company ↔ Invoice: A company generates many invoices; each invoice belongs to one company.
    125 - Client ↔ Invoice: A client can have many invoices; each invoice is addressed to one client.
    126 - Invoice ↔ LineItem: An invoice has multiple line items; each line item belongs to one invoice.
    127 - Company ↔ EmailTemplate: A company has multiple email templates; each template belongs to one company.
     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.