Dating
Dating Data Model and APIs
User Table
Column | Type | Description |
---|---|---|
user_id | integer | Primary key for the user |
username | string | Unique username for the user |
string | Unique email address for the user | |
password | string | Hashed password for the user |
first_name | string | First name of the user |
last_name | string | Last name of the user |
date_of_birth | date | Date of birth of the user |
gender | string | Gender of the user |
location | string | Location of the user |
profile_picture | string | URL of the user's profile picture |
created_at | datetime | Timestamp of when the user account was created |
updated_at | datetime | Timestamp of when the user account was last updated |
Profile Table
Column | Type | Description |
---|---|---|
profile_id | integer | Primary key for the profile |
user_id | integer | Foreign key to the user table |
headline | string | Headline or tagline for the user's profile |
about_me | string | Description of the user and their interests |
interests | string | List of the user's interests |
looking_for | string | Description of what the user is looking for in a partner |
relationship_status | string | Current relationship status of the user |
height | integer | Height of the user in centimeters |
body_type | string | Body type of the user |
education | string | Educational background of the user |
occupation | string | Occupation of the user |
religion | string | Religion of the user |
ethnicity | string | Ethnicity of the user |
created_at | datetime | Timestamp of when the profile was created |
updated_at | datetime | Timestamp of when the profile was last updated |
Match Table
Column | Type | Description |
---|---|---|
match_id | integer | Primary key for the match |
user_id_1 | integer | Foreign key to the user table for the first user in the match |
user_id_2 | integer | Foreign key to the user table for the second user in the match |
status | string | Status of the match, such as "pending", "accepted", or "rejected" |
created_at | datetime | Timestamp of when the match was created |
updated_at | datetime | Timestamp of when the match was last updated |
Message Table
Column | Type | Description |
---|---|---|
message_id | integer | Primary key for the message |
sender_id | integer | Foreign key to the user table for the sender of the message |
recipient_id | integer | Foreign key to the user table for the recipient of the message |
content | text | Content of the message |
is_read | boolean | Indicates whether the message has been read by the recipient |
created_at | datetime | Timestamp of when the message was sent |
updated_at | datetime | Timestamp of when the message was last updated |
Photo Table
Column | Type | Description |
---|---|---|
photo_id | integer | Primary key for the photo |
user_id | integer | Foreign key to the user table |
url | string | URL of the photo |
caption | string | Caption for the photo |
created_at | datetime | Timestamp of when the photo was uploaded |
updated_at | datetime | Timestamp of when the photo was last updated |