Skip to main content

Dating

Dating Data Model and APIs

User Table

ColumnTypeDescription
user_idintegerPrimary key for the user
usernamestringUnique username for the user
emailstringUnique email address for the user
passwordstringHashed password for the user
first_namestringFirst name of the user
last_namestringLast name of the user
date_of_birthdateDate of birth of the user
genderstringGender of the user
locationstringLocation of the user
profile_picturestringURL of the user's profile picture
created_atdatetimeTimestamp of when the user account was created
updated_atdatetimeTimestamp of when the user account was last updated

Profile Table

ColumnTypeDescription
profile_idintegerPrimary key for the profile
user_idintegerForeign key to the user table
headlinestringHeadline or tagline for the user's profile
about_mestringDescription of the user and their interests
interestsstringList of the user's interests
looking_forstringDescription of what the user is looking for in a partner
relationship_statusstringCurrent relationship status of the user
heightintegerHeight of the user in centimeters
body_typestringBody type of the user
educationstringEducational background of the user
occupationstringOccupation of the user
religionstringReligion of the user
ethnicitystringEthnicity of the user
created_atdatetimeTimestamp of when the profile was created
updated_atdatetimeTimestamp of when the profile was last updated

Match Table

ColumnTypeDescription
match_idintegerPrimary key for the match
user_id_1integerForeign key to the user table for the first user in the match
user_id_2integerForeign key to the user table for the second user in the match
statusstringStatus of the match, such as "pending", "accepted", or "rejected"
created_atdatetimeTimestamp of when the match was created
updated_atdatetimeTimestamp of when the match was last updated

Message Table

ColumnTypeDescription
message_idintegerPrimary key for the message
sender_idintegerForeign key to the user table for the sender of the message
recipient_idintegerForeign key to the user table for the recipient of the message
contenttextContent of the message
is_readbooleanIndicates whether the message has been read by the recipient
created_atdatetimeTimestamp of when the message was sent
updated_atdatetimeTimestamp of when the message was last updated

Photo Table

ColumnTypeDescription
photo_idintegerPrimary key for the photo
user_idintegerForeign key to the user table
urlstringURL of the photo
captionstringCaption for the photo
created_atdatetimeTimestamp of when the photo was uploaded
updated_atdatetimeTimestamp of when the photo was last updated