chore: normalize code

This commit is contained in:
Maulana Sodiqin
2025-05-17 02:08:59 +07:00
parent 874f25aa80
commit a43ef8ec04
104 changed files with 691 additions and 655 deletions
@@ -0,0 +1,27 @@
use crate::{make_thing, ResourceEnum};
use serde::{Deserialize, Serialize};
use surrealdb::{sql::Thing, Uuid};
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct PermissionsSchema {
pub id: Thing,
pub name: String,
pub is_deleted: bool,
pub created_at: Option<String>,
pub updated_at: Option<String>,
}
impl Default for PermissionsSchema {
fn default() -> Self {
PermissionsSchema {
id: make_thing(
&ResourceEnum::Permissions.to_string(),
&Uuid::new_v4().to_string(),
),
name: String::new(),
is_deleted: false,
created_at: None,
updated_at: None,
}
}
}