feat: Enhance permissions and roles management with improved indexing and state handling

This commit is contained in:
MythEclipse committed 2025-08-14 23:11:44 +07:00
1 parent 199d0c885e
commit 10dc869eaf
10 files changed
+134 -171

No files matched your search

@@ -16,7 +16,12 @@ async fn main() -> Result<(), Box<dyn Error>> {
.use_db(env.surrealdb_dbname.clone())
.await?;
db.query("DEFINE INDEX user_email_index ON TABLE users COLUMNS email UNIQUE;")
.await?;
db.query("DEFINE INDEX role_name_idx ON TABLE roles COLUMNS name UNIQUE;")
.await?;
println!("✅ Index 'user_email_index' defined on table 'users' for column 'email'.");
let roles_permissions = vec![