Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
krishaarya opened this issue Oct 26, 2024 · 0 comments
Open

Comments

@krishaarya
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant