StefanPenchev05 / MyClothesV2

Welcome to MyClothes, where creativity meets fashion! This application provides a platform for designers to showcase their clothing products, receive feedback through comments and likes, engage in real-time chat, and even get hired by clients who love their work.
MIT License
0 stars 0 forks source link

Creating User Model #9

Closed StefanPenchev05 closed 4 months ago

StefanPenchev05 commented 4 months ago

This issue covers the creation and testing of the User Model in our application. The User Model is a critical component of our system, representing the users of our application and their associated data.

The User Model should include the following fields:

Basic user information: First name, last name, username, email, password, and role. Profile details: Bio, profile picture path, occupation, birthday, hobbies, social media links, skills, favorite quote, languages, achievements, education, and work experience. Relationships with other users: Lists of followers and following. Saved products: A list of products saved by the user. Chat sessions: A list of chat sessions the user is part of. Each field should have appropriate validation, such as required fields, minimum and maximum lengths, and uniqueness constraints. The model should also include methods for checking if a username or email already exists in the database.

In addition, the password should be hashed before being stored in the database for security reasons.

Unit tests should be written to ensure the model behaves as expected, including tests for validation and any methods added to the model.

Finally, the model should be integrated into the rest of the application and tested in the context of the entire system.

StefanPenchev05 commented 4 months ago

Also, the building-in validations for checking if the email of username already exists