Update macro to use #[index] attributes
- Also use proper types for index. - Update DB interface to be more flexible for index params Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ use serde::{Serialize, Deserialize};
|
||||
pub struct SimpleUser {
|
||||
pub base_data: BaseModelData,
|
||||
|
||||
/// @index
|
||||
#[index]
|
||||
pub login: String,
|
||||
|
||||
pub full_name: String,
|
||||
@@ -20,10 +20,10 @@ pub struct SimpleUser {
|
||||
pub struct CustomUser {
|
||||
pub base_data: BaseModelData,
|
||||
|
||||
/// @index(name = "user_name", key_type = "str")
|
||||
#[index(name = "user_name")]
|
||||
pub login_name: String,
|
||||
|
||||
/// @index(key_type = "bool")
|
||||
#[index]
|
||||
pub is_active: bool,
|
||||
|
||||
pub full_name: String,
|
||||
|
Reference in New Issue
Block a user