GVishnudhasan / NoDueProject

An automated system for requesting and approving no-due certificates for students at the end of each semester for universities and colleges.
https://no-due-ksriet.netlify.app/
MIT License
24 stars 49 forks source link

[enhancement] Models enhancement, adding timestamp and using trim true #147

Open krishaarya opened 1 month ago

krishaarya commented 1 month ago

The current Admin schema in our project could benefit from several enhancements to improve data integrity, security, and performance. Here are proposed changes to make the schema more robust:

1) Add timestamps: Automatically include createdAt and updatedAt fields to track record creation and updates. 2) Add trim to String fields: Removes unnecessary whitespace from user inputs for name, facultyid, email, etc. 3) Set required fields: Enforce mandatory fields like name, email, facultyid, and password for data consistency. 4) Add unique constraints: Ensure that facultyid and email are unique to prevent duplicate entries. (4th is optional)