BE - Add Pronouns and Gender Fields to Profile Schema #65
Labels
ansopedia
backend
database
enhancement
New feature or request
good first issue
Good for newcomers
hacktoberfest
Milestone
Description:
We need to enhance the user profile schema by adding fields for gender and pronouns. The pronouns will be derived from the selected gender on the server side, allowing users to provide only their gender. Additionally, gender will be kept private while pronouns will be public.
Key Requirements:
1. Schema Update:
gender: z.enum(['male', 'female', 'non-binary', 'other']),
pronouns: z.enum(['he/him', 'she/her', 'they/them', 'other'])
(derived from gender).2. Synchronization Logic:
pronouns
field based on thegender
:gender
is male, setpronouns
to he/him.gender
is female, setpronouns
to she/her.gender
is non-binary, setpronouns
to they/them.gender
is other, allow any pronouns (he/him, she/her, they/them, other).3. Profile Visibility:
gender
field is private and not visible to users viewing another profile.pronouns
field to be public and visible in profile responses.4. Update Aggregation Pipeline:
gender
field for other users.pronouns
field when a user views another user's profile.5. Testing:
Tasks:
gender
andpronouns
.The text was updated successfully, but these errors were encountered: