Skip to content

Latest commit

 

History

History
executable file
·
76 lines (58 loc) · 4.13 KB

users-model.md

File metadata and controls

executable file
·
76 lines (58 loc) · 4.13 KB

ATTRIBUTE DEFINITION

USER

USER

ATTRIBUTE DATATYPE DEFINITION
user_id INT PK
name STRING A name is the first name of the owner of the account.A name is useful for interaction with the user via emails or in center, etc.A name is NOT UNIQUE.A name is REQUIRED.A name is CHANGING.A name is not a KEY CANDIDATE.
public_id UUID A public_id is the unique identifier for the user in the website.A public_id is required for user authentication.A public_id is UNIQUE, NOT NULL NEVER CHANGING.
email STRING An Email is the email that we use to communicate with the user for authentication and authorizationAn Email is UNIQUE, REQUIRED, CHANGING.
country_name STRING A country_name is the country the USER lives in.A country_name is useful for real world communication with users and also PAYMENT methods and PAYMENT system.A country_name is NOT UNIQUE,REQUIRED, CHANGING.
profile_picture STRING A Profile Picture is a picture the user puts for other users to recognize him.A Profile Picture is NOT UNIQUE, REQUIRED, CHANGING.A Profile Picture has a default value.
phone_number STRING A phone_number is the phone number the user used for communication with the user.A phone_number is UNIQUE, CHANGING, REQUIRED.
birth_date DATE A birth_date is the date of birth of the user.A birth_date is useful for extracting age and being a REQUIREMENT in some of the programs.A birth_date is NOT UNIQUE, NEVER CHANGING, REQUIRED.
gender BOOLEAN A Gender is the gender of the user.A Gender is useful for being a prerequisite in some of the programs.A Gender is NOT UNIQUE, NEVER CHANGING , REQUIRED.
password STRING A Password is the secret keyword of the user.A Password is used for user authentication.A Password is NOT UNIQUE, CHANGING, REQUIRED.
registeration_date DATE A registeration_date is the date when the user registered for our website.A registeration_date is useful for offers,etcA registeration_date is NOT UNIQUE,NEVER CHANGING,NOT NULL.
is_activated BOOLEAN An is_activated attribute is an attribute that indicates whether the account has been activated or not and giving access to the account to the user depends on it being activated.An is_activated attribute is NOT UNIQUE, CHANGING, NOT NULLAn is_activated attribute has a default value of FALSE.
type STRING A type is a discriminator that indicates whether the user is STAFF or STUDENT.A type is NOT UNIQUE, NOT NULL, NEVER CHANGING.

STUDENT

ATTRIBUTE DATA TYPE DEFINITION
user_id INT FK

STUDENT_GUARDIAN

ATTRIBUTE DATA-TYPE DEFINITION
user_guardian_id INT PK
user_id INT FK
guardian_id INT FK

GUARDIAN

ATTRIBUTE DATA-TYPE DEFINITION
guardian_id INT PK
email STRING An email is the email of the guardian that oversees the performance of his child.An email is UNIQUE,CHANGING,NOTNULL.
phone_number STRING A phone_number is the phone_number of the guardian that oversees the performance of his child.A phone_number is UNIQUE, CHANGING, NOTNULL.

STAFF

ATTRIBUTE DATA-TYPE DEFINITION
user_id INT FK

STAFF_PERMISSION

ATTRIBUTE DATA-TYPE DEFINITION
user_permission_id INT PK
staff_id INT FK
permission_id SMALLINT FK

PERMISSION

ATTRIBUTE DATA-TYPE DEFINITION
permission_id INT PK
permission_name STRING A permission_name is the name of the permission created by the ADMINISTRATOR to assign it to STAFF members to give them privileges to act within the website.A permission_name is UNIQUE, CHANGING ,NOTNULL.