use surrealdb::types::SurrealValue;
/// A named set of permissions (`role:<id>`), such as `super_admin` or `user`.
/// Users hold roles through `user_role:[user_id, role_id]` records.
#[derive(Debug, Clone, SurrealValue)]
pub struct Role {
pub id: i64,
pub name: String,
}
impl Role {
/// What to select for this struct: every field, with the numeric `id`,
/// e.g. `SELECT {FIELDS} FROM role WHERE ...`.
pub const FIELDS: &str = "*, record::id(id) AS id";
}