- Added PermissionsRepository for managing permissions, including fetching, creating, and deleting permissions.
- Added ProfileRepository for handling user profile data, including fetching, updating, and uploading avatars.
- Added ResourcesRepository for managing resources, including fetching, creating, updating, and deleting resources.
- Added RolesRepository for managing roles, including fetching all roles and role permissions.
- Added UserRepository for managing user data, including authentication checks, updating user metadata, and fetching user details.
- Created a bindings file for personalization features.
- Implemented user creation, update, and deletion triggers to manage officer and standard user data.
- Created functions to handle user type changes and conditional updates based on user metadata.
- Added a function to retrieve nearby units based on geographical coordinates.
- Established triggers to update distance to units upon location changes.
- Created spatial indexes for efficient querying of units and locations.
- Added a function to delete the current user from the auth.users table.