Changes between Version 13 and Version 14 of ConceptualModel


Ignore:
Timestamp:
05/05/26 09:06:16 (4 hours ago)
Author:
231035
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ConceptualModel

    v13 v14  
    11== ERModel Current version
    22== Diagram ==
    3 [[Image(ERModel_v03.jpg)]]
     3[[Image(ERModel_v04.jpg)]]
    44== Data requirements ==
    55=== ENTITIES ===
     
    100100{{{VetClinic}}}
    101101[[BR]]
    102 Represents veterinary clinics that cooperate with the platform. It is needed so animals, appointments, and reviews can be associated with a specific clinic. It is modeled as a separate entity because clinics are independent organizational units with their own attributes and can be referenced by many animals, appointments, and reviews.
     102Represents veterinary clinics that cooperate with the platform. It is needed so animals, appointments, and reviews can be associated with a specific clinic. It is modeled as a separate entity because clinics are independent organizational units with their own attributes and can be referenced by many animals, appointments, and reviews. The clinics are technically User so thats why they are a specialization from them. Every vet_clinic has a user_id representint the actual user in the User table.
    103103[[BR]]
    104104'''[[span(style=color: #E30B5C, Candidate keys: )]]'''
     
    115115* {{{email}}} – text, optional. Must be valid email format; must be unique.
    116116* {{{phone}}} – text, optional. May require a specific phone-number format.
     117* {{{application_id}}} - FK, to vet_clinic_appointments, the appointment that got the clinic to be accepted
    117118
    118119[[BR]]
     
    245246* {{{client_id}}} – numeric, required. Identifies the client who favorites the listing.
    246247* {{{listing_id}}} – numeric, required. Identifies the favorited listing.
     248----
     249{{{clinic_unavailable_slots}}}
     250[[BR]]
     251Represents when is a clinic not available, based on appointment made by the owners.
     252[[BR]]
     253'''[[span(style=color: #E30B5C, Candidate keys: )]]'''
     254* {{{slot_id}}} – simple PK
     255[[BR]]
     256'''[[span(style=color: #E30B5C, Attributes: )]]'''
     257* {{{date_time}}} – timestamp, when is the clinic not available
     258* {{{reason}}} – text, why isn't it available(clinics can make appointments not available without having an appointment scheduled)
     259* {{{created_at}}} - timestamp, when was it created
    247260=== RELATIONS ===
    248261[[BR]]
     
    394407[[BR]]
    395408Represents that a user can't leave a review for a clinic if he hasn't had a appointment there.
     409---
     410[[BR]]
     411{{{available_at(vet_clinic - clinic_unavailable_slot)}}}
     412[[BR]]
     413Represents for which clinic is that unavailable slot meant for. The relation is 1:N, one clinic can have many unavailable slots while one slot MUST be for one clinic.
     414----
     415[[BR]]
     416{{{reviews(Admin - Vet_clinic_application}}}
     417[[BR]]
     418An Admin reviews the application, they can either deny or accept it. The relation is 1:N, one application can be reviews by one admin, one admin can review more then 1 applications.
     419----
     420[[BR]]
     421{{{blocked_by(Client - Admin)}}}
     422[[BR]]
     423A client can be blocked by an admin. One admin can block multiple clients while one client can be blocked by one admin at a time.
     424----
     425[[BR]]
     426{{{saved_by(User -  Favorited_listing)}}}
     427[[BR]]
     428A user can save multiple listings as favorite, one favorite listing can be saved by one user.
     429----
     430[[BR]]
     431{{{saved(Listing - Favorited_listing)}}}
     432[[BR]]
     433One listing can be saved for multiple users as a favorite listing, a favorite listing can have one listing.
     434
    396435
    397436== ERModel History
     
    399438[[BR]]
    400439VersionTwo - The schema was updated by adding password support for clients, introducing a vet clinic application table to handle clinic onboarding.Blocking attributes were added for clients that store the responsible admin and reason. Additionally, a favorites table was introduced to represent the relationship between clients and listings
     440[[BR]]
     441VersionThree - Added a new table for clinic_unavailable_slots.