feat: update logic
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use crate::PermissionsItemDto;
|
||||
use crate::{PermissionsItemDto, PermissionsItemDtoRaw};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use surrealdb::sql::Thing;
|
||||
use utoipa::ToSchema;
|
||||
use validator::Validate;
|
||||
|
||||
@@ -27,6 +28,15 @@ pub struct RolesItemListDto {
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
|
||||
pub struct RolesItemDto {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub permissions: Vec<PermissionsItemDto>,
|
||||
pub created_at: Option<String>,
|
||||
pub updated_at: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
|
||||
pub struct RolesItemByIdDto {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub is_deleted: bool,
|
||||
@@ -34,3 +44,23 @@ pub struct RolesItemDto {
|
||||
pub created_at: Option<String>,
|
||||
pub updated_at: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct RolesItemByIdDtoRaw {
|
||||
pub id: Thing,
|
||||
pub name: String,
|
||||
pub permissions: Vec<PermissionsItemDtoRaw>,
|
||||
pub is_deleted: bool,
|
||||
pub created_at: Option<String>,
|
||||
pub updated_at: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct RolesItemDtoRaw {
|
||||
pub id: Thing,
|
||||
pub name: String,
|
||||
pub permissions: Vec<PermissionsItemDtoRaw>,
|
||||
pub is_deleted: bool,
|
||||
pub created_at: Option<String>,
|
||||
pub updated_at: Option<String>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user