diff --git a/.github/workflows/iam-release.yml b/.github/workflows/iam-release.yml index 29f1979bf..15fa890f1 100644 --- a/.github/workflows/iam-release.yml +++ b/.github/workflows/iam-release.yml @@ -2,6 +2,8 @@ name: Publish bios-iam crate on: push: + branches: + - release-iam tags: - 'release-*' diff --git a/backend/basic/src/dto.rs b/backend/basic/src/dto.rs index 4731529bd..bec2a5a5a 100644 --- a/backend/basic/src/dto.rs +++ b/backend/basic/src/dto.rs @@ -13,8 +13,7 @@ use tardis::web::poem_openapi; /// Basic query condition object /// /// 基础的查询条件对象 -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object)] pub struct BasicQueryCondInfo { /// Query field #[oai(validator(min_length = "1"))] diff --git a/backend/basic/src/enumeration.rs b/backend/basic/src/enumeration.rs index 1d669c537..0ea714df3 100644 --- a/backend/basic/src/enumeration.rs +++ b/backend/basic/src/enumeration.rs @@ -7,8 +7,7 @@ use tardis::web::poem_openapi; /// API classification /// /// API分类 -#[derive(Display, Debug)] -#[derive(poem_openapi::Tags)] +#[derive(Display, Debug, poem_openapi::Tags)] pub enum ApiTag { /// Common Console, mostly starting with ``cc``, generally do not require authentication. /// @@ -45,8 +44,7 @@ pub enum ApiTag { /// Basic query operator /// /// 基础查询操作符 -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[derive(poem_openapi::Enum)] +#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum)] pub enum BasicQueryOpKind { #[oai(rename = "=")] Eq, diff --git a/backend/basic/src/helper.rs b/backend/basic/src/helper.rs index a252922d9..f55224e58 100644 --- a/backend/basic/src/helper.rs +++ b/backend/basic/src/helper.rs @@ -1,4 +1,3 @@ - pub mod db_helper; pub mod request_helper; diff --git a/backend/basic/src/rbum.rs b/backend/basic/src/rbum.rs index c3973cbc3..f49d04535 100644 --- a/backend/basic/src/rbum.rs +++ b/backend/basic/src/rbum.rs @@ -1,4 +1,3 @@ - pub(crate) mod domain; pub mod dto; pub mod helper; diff --git a/backend/basic/src/rbum/dto/rbum_cert_conf_dto.rs b/backend/basic/src/rbum/dto/rbum_cert_conf_dto.rs index 7f35b4cae..063564662 100644 --- a/backend/basic/src/rbum/dto/rbum_cert_conf_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_cert_conf_dto.rs @@ -11,8 +11,7 @@ use crate::rbum::rbum_enumeration::RbumCertConfStatusKind; /// Add request for certificate configuration /// /// 凭证配置添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumCertConfAddReq { /// Certificate configuration type /// @@ -268,8 +267,7 @@ pub struct RbumCertConfAddReq { /// Modify request for certificate configuration /// /// 凭证配置修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumCertConfModifyReq { /// Certificate configuration name /// @@ -442,8 +440,7 @@ pub struct RbumCertConfModifyReq { /// Certificate configuration summary information /// /// 凭证配置概要信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumCertConfSummaryResp { /// Certificate configuration id /// @@ -543,8 +540,7 @@ pub struct RbumCertConfSummaryResp { /// Certificate configuration detail information /// /// 凭证配置详细信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumCertConfDetailResp { /// Certificate configuration id /// @@ -662,8 +658,7 @@ pub struct RbumCertConfDetailResp { /// Certificate configuration id and extension information /// /// 凭证配置id和扩展信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumCertConfIdAndExtResp { /// Certificate configuration id /// diff --git a/backend/basic/src/rbum/dto/rbum_cert_dto.rs b/backend/basic/src/rbum/dto/rbum_cert_dto.rs index b4ad44b70..6a474ab53 100644 --- a/backend/basic/src/rbum/dto/rbum_cert_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_cert_dto.rs @@ -11,8 +11,7 @@ use crate::rbum::rbum_enumeration::{RbumCertRelKind, RbumCertStatusKind}; /// Add request for certificate /// /// 凭证添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumCertAddReq { /// Certification access key /// @@ -175,8 +174,7 @@ pub struct RbumCertAddReq { /// Modify request for certificate /// /// 凭证修改请求 -#[derive(Serialize, Deserialize, Debug, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Default, poem_openapi::Object)] pub struct RbumCertModifyReq { /// Certification access key /// @@ -247,8 +245,7 @@ pub struct RbumCertModifyReq { /// Certificate summary information /// /// 凭证概要信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumCertSummaryResp { /// Certification id /// @@ -309,8 +306,7 @@ pub struct RbumCertSummaryResp { /// Certificate summary information with secret key /// /// 带有密钥的凭证概要信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumCertSummaryWithSkResp { /// Certification id /// @@ -383,8 +379,7 @@ pub struct RbumCertSummaryWithSkResp { /// Certificate detail information /// /// 凭证详细信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumCertDetailResp { /// Certification id /// diff --git a/backend/basic/src/rbum/dto/rbum_domain_dto.rs b/backend/basic/src/rbum/dto/rbum_domain_dto.rs index 7c316a156..62a02d0c9 100644 --- a/backend/basic/src/rbum/dto/rbum_domain_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_domain_dto.rs @@ -11,8 +11,7 @@ use crate::rbum::rbum_enumeration::RbumScopeLevelKind; /// Add request for resource domain /// /// 资源域添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumDomainAddReq { /// Resource domain code /// @@ -53,8 +52,7 @@ pub struct RbumDomainAddReq { /// Modify request for resource domain /// /// 资源域修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumDomainModifyReq { /// Resource domain name /// @@ -88,8 +86,7 @@ pub struct RbumDomainModifyReq { /// Resource domain summary information /// /// 资源域概要信息 -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumDomainSummaryResp { /// Resource domain id /// @@ -123,8 +120,7 @@ pub struct RbumDomainSummaryResp { /// Resource domain detail information /// /// 资源域详细信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumDomainDetailResp { /// Resource domain id /// diff --git a/backend/basic/src/rbum/dto/rbum_filer_dto.rs b/backend/basic/src/rbum/dto/rbum_filer_dto.rs index 31f86f24c..b804cea3b 100644 --- a/backend/basic/src/rbum/dto/rbum_filer_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_filer_dto.rs @@ -11,8 +11,7 @@ use crate::rbum::rbum_enumeration::{RbumCertConfStatusKind, RbumCertRelKind, Rbu /// Resource basic filter /// /// 资源基础过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumBasicFilterReq { /// Whether to ignore the scope @@ -80,8 +79,7 @@ pub struct RbumBasicFilterReq { /// Resource certificate configuration filter /// /// 资源凭证配置过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumCertConfFilterReq { /// Basic filter @@ -113,8 +111,7 @@ pub struct RbumCertConfFilterReq { /// Resource certificate filter /// /// 资源凭证过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumCertFilterReq { /// Basic filter @@ -174,8 +171,7 @@ pub struct RbumCertFilterReq { /// Resource kind filter /// /// 资源类型过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumKindFilterReq { /// Basic filter @@ -191,8 +187,7 @@ pub struct RbumKindFilterReq { /// Resource kind attribute filter /// /// 资源类型属性过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumKindAttrFilterReq { /// Basic filter @@ -212,8 +207,7 @@ pub struct RbumKindAttrFilterReq { /// Resource item attribute filter /// /// 资源项属性过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumItemAttrFilterReq { /// Basic filter @@ -233,8 +227,7 @@ pub struct RbumItemAttrFilterReq { /// Resource relation filter /// /// 资源关联过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumRelFilterReq { /// Basic filter @@ -282,8 +275,7 @@ pub struct RbumRelFilterReq { /// Resource relation extension filter /// /// 资源关联扩展过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumRelExtFilterReq { /// Basic filter @@ -299,8 +291,7 @@ pub struct RbumRelExtFilterReq { /// Resource set filter /// /// 资源集过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] pub struct RbumSetFilterReq { /// Basic filter /// @@ -319,8 +310,7 @@ pub struct RbumSetFilterReq { /// Resource set category(node) filter /// /// 资源集分类(节点)过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] pub struct RbumSetCateFilterReq { /// Basic filter /// @@ -363,8 +353,7 @@ pub struct RbumSetCateFilterReq { /// Resource set category(node) mount resource item filter /// /// 资源集分类(节点)挂载资源项的过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] pub struct RbumSetItemFilterReq { /// Basic filter /// @@ -434,8 +423,7 @@ pub struct RbumSetItemFilterReq { /// Resource set filter /// /// 资源集过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] pub struct RbumSetTreeFilterReq { /// Resource category (node) sys_codes /// @@ -510,8 +498,7 @@ pub struct RbumSetTreeFilterReq { /// Resource set category (node) associated filter for mounted resource items /// /// 资源集分类(节点)挂载资源项的关联过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumSetItemRelFilterReq { /// Resource set id and resource category (node) id set @@ -535,8 +522,7 @@ pub struct RbumSetItemRelFilterReq { /// Simple Resource item relation filter /// /// 简单的资源项关联过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumItemRelSimpleFilterReq { /// Whether the related party is a ``from`` party @@ -560,8 +546,7 @@ pub struct RbumItemRelSimpleFilterReq { /// Resource item relation filter /// /// 资源项关联过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumItemRelFilterReq { /// Is it optional @@ -625,8 +610,7 @@ pub trait RbumItemFilterFetcher { /// Resource item basic filter /// /// 资源项基础过滤器 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumItemBasicFilterReq { /// Basic filter diff --git a/backend/basic/src/rbum/dto/rbum_item_attr_dto.rs b/backend/basic/src/rbum/dto/rbum_item_attr_dto.rs index bdbd16c2b..0b675e859 100644 --- a/backend/basic/src/rbum/dto/rbum_item_attr_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_item_attr_dto.rs @@ -10,8 +10,7 @@ use tardis::web::poem_openapi; /// Add request for resource item extended attribute value /// /// 资源项扩展属性值添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumItemAttrAddReq { /// Extended attribute value /// @@ -33,8 +32,7 @@ pub struct RbumItemAttrAddReq { /// Modify request for resource item extended attribute value /// /// 资源项扩展属性值修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumItemAttrModifyReq { /// Extended attribute value /// @@ -46,8 +44,7 @@ pub struct RbumItemAttrModifyReq { /// Batch add or modify request for resource item extended attribute values /// /// 批量添加或修改资源项扩展属性值请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumItemAttrsAddOrModifyReq { /// Add or modify value collection /// @@ -67,8 +64,7 @@ pub struct RbumItemAttrsAddOrModifyReq { /// Resource item extended attribute value summary information /// /// 源项扩展属性值概要信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumItemAttrSummaryResp { /// Extended attribute value id /// @@ -100,8 +96,7 @@ pub struct RbumItemAttrSummaryResp { /// Resource item extended attribute value detail information /// /// 源项扩展属性值详细信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumItemAttrDetailResp { /// Extended attribute value id /// diff --git a/backend/basic/src/rbum/dto/rbum_item_dto.rs b/backend/basic/src/rbum/dto/rbum_item_dto.rs index 6509e9def..5cb400791 100644 --- a/backend/basic/src/rbum/dto/rbum_item_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_item_dto.rs @@ -11,8 +11,7 @@ use crate::rbum::rbum_enumeration::RbumScopeLevelKind; /// Add request for resource item /// /// 资源项添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumItemAddReq { /// Resource item id /// @@ -139,8 +138,7 @@ pub struct RbumItemKernelModifyReq { /// Resource item summary information /// /// 资源项概要信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumItemSummaryResp { /// Resource item id /// @@ -175,8 +173,7 @@ pub struct RbumItemSummaryResp { /// Resource item detail information /// /// 资源项详细信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumItemDetailResp { /// Resource item id /// diff --git a/backend/basic/src/rbum/dto/rbum_kind_attr_dto.rs b/backend/basic/src/rbum/dto/rbum_kind_attr_dto.rs index 46e4d90c5..4ae2b474a 100644 --- a/backend/basic/src/rbum/dto/rbum_kind_attr_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_kind_attr_dto.rs @@ -11,8 +11,7 @@ use crate::rbum::rbum_enumeration::{RbumDataTypeKind, RbumScopeLevelKind, RbumWi /// Add request for resource kind attribute definition /// /// 资源类型属性定义添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumKindAttrAddReq { /// Attribute definition module /// @@ -278,8 +277,7 @@ pub struct RbumKindAttrAddReq { /// Modify request for resource kind attribute definition /// /// 资源类型属性定义修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumKindAttrModifyReq { /// Attribute definition label /// @@ -477,8 +475,7 @@ pub struct RbumKindAttrModifyReq { /// Resource kind attribute definition summary information /// /// 资源类型属性定义概要信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumKindAttrSummaryResp { /// Attribute definition id /// @@ -633,8 +630,7 @@ pub struct RbumKindAttrSummaryResp { /// Resource kind attribute definition detail information /// /// 资源类型属性定义详细信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumKindAttrDetailResp { /// Attribute definition id /// diff --git a/backend/basic/src/rbum/dto/rbum_kind_dto.rs b/backend/basic/src/rbum/dto/rbum_kind_dto.rs index 5d2c6b70a..679f2cf1e 100644 --- a/backend/basic/src/rbum/dto/rbum_kind_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_kind_dto.rs @@ -11,8 +11,7 @@ use crate::rbum::rbum_enumeration::RbumScopeLevelKind; /// Add request for resource kind /// /// 资源类型添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumKindAddReq { /// Resource kind module /// @@ -71,8 +70,7 @@ pub struct RbumKindAddReq { /// Modify request for resource kind /// /// 资源类型修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumKindModifyReq { /// Resource kind module /// @@ -118,8 +116,7 @@ pub struct RbumKindModifyReq { /// Resource kind summary information /// /// 资源类型概要信息 -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumKindSummaryResp { /// Resource kind id /// @@ -161,8 +158,7 @@ pub struct RbumKindSummaryResp { /// Resource kind detail information /// /// 资源类型详细信息 -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumKindDetailResp { /// Resource kind id /// diff --git a/backend/basic/src/rbum/dto/rbum_rel_agg_dto.rs b/backend/basic/src/rbum/dto/rbum_rel_agg_dto.rs index 9f37a83d0..788b0e33a 100644 --- a/backend/basic/src/rbum/dto/rbum_rel_agg_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_rel_agg_dto.rs @@ -10,8 +10,7 @@ use crate::rbum::rbum_enumeration::RbumRelEnvKind; /// Add request for resource relationship aggregation /// /// 资源关联聚合添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumRelAggAddReq { /// Relationship information /// @@ -30,8 +29,7 @@ pub struct RbumRelAggAddReq { /// Add request for resource relationship attribute aggregation /// /// 资源关联属性聚合添加请求 -#[derive(Serialize, Deserialize, Clone, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Clone, Debug, poem_openapi::Object)] pub struct RbumRelAttrAggAddReq { /// Condition qualifier /// @@ -74,8 +72,7 @@ pub struct RbumRelAttrAggAddReq { /// Add request for resource relationship environment aggregation /// /// 资源关联环境聚合添加请求 -#[derive(Serialize, Deserialize, Clone, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Clone, Debug, poem_openapi::Object)] pub struct RbumRelEnvAggAddReq { /// Relationship environment type /// @@ -96,8 +93,7 @@ pub struct RbumRelEnvAggAddReq { /// Resource relationship aggregation detail information /// /// 资源关联聚合详细信息 -#[derive(Serialize, Deserialize, Clone, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Clone, Debug, poem_openapi::Object)] pub struct RbumRelAggResp { /// Relationship information /// diff --git a/backend/basic/src/rbum/dto/rbum_rel_attr_dto.rs b/backend/basic/src/rbum/dto/rbum_rel_attr_dto.rs index 8f3f45d37..d6a64bf33 100644 --- a/backend/basic/src/rbum/dto/rbum_rel_attr_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_rel_attr_dto.rs @@ -8,8 +8,7 @@ use tardis::web::poem_openapi; /// Add request for resource relationship attribute condition /// /// 资源关联属性条件添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumRelAttrAddReq { /// Condition qualifier /// @@ -57,8 +56,7 @@ pub struct RbumRelAttrAddReq { /// Modify request for resource relationship attribute condition /// /// 资源关联属性条件修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumRelAttrModifyReq { /// Relationship attribute value /// @@ -70,8 +68,7 @@ pub struct RbumRelAttrModifyReq { /// Resource relationship attribute condition detail information /// /// 资源关联属性条件详细信息 -#[derive(Serialize, Deserialize, Clone, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Clone, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumRelAttrDetailResp { /// Relationship attribute id /// diff --git a/backend/basic/src/rbum/dto/rbum_rel_dto.rs b/backend/basic/src/rbum/dto/rbum_rel_dto.rs index 5fd88c49b..c0011195d 100644 --- a/backend/basic/src/rbum/dto/rbum_rel_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_rel_dto.rs @@ -12,8 +12,7 @@ use crate::rbum::rbum_enumeration::{RbumRelEnvKind, RbumRelFromKind}; /// Add request for resource relationship /// /// 资源关联添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumRelAddReq { /// Relationship tag /// @@ -71,8 +70,7 @@ pub struct RbumRelAddReq { /// Modify request for resource relationship /// /// 资源关联修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumRelModifyReq { /// Relationship tag /// @@ -103,8 +101,7 @@ pub struct RbumRelModifyReq { /// Simple find request for resource relationship /// /// 资源关联简单查找请求 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct RbumRelSimpleFindReq { /// Relationship tag @@ -145,8 +142,7 @@ pub struct RbumRelSimpleFindReq { /// Check request for resource relationship /// /// 资源关联检查请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumRelCheckReq { /// Relationship tag /// @@ -196,8 +192,7 @@ pub struct RbumRelCheckReq { /// Check request for resource relationship environment /// /// 资源关联环境检查请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumRelEnvCheckReq { /// Relationship environment type /// @@ -212,8 +207,7 @@ pub struct RbumRelEnvCheckReq { /// Resource relationship bone information /// /// 资源关联骨干信息 -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumRelBoneResp { /// Relationship tag /// @@ -300,8 +294,7 @@ impl RbumRelBoneResp { /// Resource relationship detail information /// /// 资源关联详细信息 -#[derive(Serialize, Deserialize, Clone, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Clone, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumRelDetailResp { /// Relationship id /// diff --git a/backend/basic/src/rbum/dto/rbum_rel_env_dto.rs b/backend/basic/src/rbum/dto/rbum_rel_env_dto.rs index 3c764bfbe..37fa86fc3 100644 --- a/backend/basic/src/rbum/dto/rbum_rel_env_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_rel_env_dto.rs @@ -10,8 +10,7 @@ use crate::rbum::rbum_enumeration::RbumRelEnvKind; /// Add request for resource relationship environment condition /// /// 资源关联环境条件添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumRelEnvAddReq { /// Relationship environment type /// @@ -37,8 +36,7 @@ pub struct RbumRelEnvAddReq { /// Modify request for resource relationship environment condition /// /// 资源关联环境条件修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumRelEnvModifyReq { /// Relationship environment value1 /// @@ -55,8 +53,7 @@ pub struct RbumRelEnvModifyReq { /// Resource relationship environment condition detail information /// /// 资源关联环境条件详细信息 -#[derive(Serialize, Deserialize, Clone, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Clone, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumRelEnvDetailResp { /// Relationship environment id /// diff --git a/backend/basic/src/rbum/dto/rbum_set_cate_dto.rs b/backend/basic/src/rbum/dto/rbum_set_cate_dto.rs index 61cc147c2..b3d4c6b65 100644 --- a/backend/basic/src/rbum/dto/rbum_set_cate_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_set_cate_dto.rs @@ -11,8 +11,7 @@ use crate::rbum::rbum_enumeration::RbumScopeLevelKind; /// Add request for resource set category(node) /// /// 资源集分类(节点)添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumSetCateAddReq { /// Business code for custom /// @@ -55,8 +54,7 @@ pub struct RbumSetCateAddReq { /// Modify request for resource set category(node) /// /// 资源集分类(节点)修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumSetCateModifyReq { /// Business code for custom /// @@ -95,8 +93,7 @@ pub struct RbumSetCateModifyReq { /// Resource set category(node) summary information /// /// 资源集分类(节点)概要信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumSetCateSummaryResp { /// Node id /// @@ -146,8 +143,7 @@ pub struct RbumSetCateSummaryResp { /// Resource set category(node) detail information /// /// 资源集分类(节点)详细信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumSetCateDetailResp { /// Node id /// diff --git a/backend/basic/src/rbum/dto/rbum_set_dto.rs b/backend/basic/src/rbum/dto/rbum_set_dto.rs index edb09cbea..ed9e43a47 100644 --- a/backend/basic/src/rbum/dto/rbum_set_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_set_dto.rs @@ -15,8 +15,7 @@ use crate::rbum::rbum_enumeration::RbumScopeLevelKind; /// Add request for resource set /// /// 资源集添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumSetAddReq { /// Resource set code /// @@ -60,8 +59,7 @@ pub struct RbumSetAddReq { /// Modify request for resource set /// /// 资源集修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumSetModifyReq { /// Resource set name /// @@ -95,8 +93,7 @@ pub struct RbumSetModifyReq { /// Resource set summary information /// /// 资源集概要信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumSetSummaryResp { /// Resource set id /// @@ -139,8 +136,7 @@ pub struct RbumSetSummaryResp { /// Resource set detail information /// /// 资源集详细信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumSetDetailResp { /// Resource set id /// @@ -188,8 +184,7 @@ pub struct RbumSetDetailResp { /// Resource set path information /// /// 资源集路径信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumSetPathResp { /// Node id /// @@ -206,8 +201,7 @@ pub struct RbumSetPathResp { /// Resource tree information /// /// 资源树信息 -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object)] pub struct RbumSetTreeResp { /// Resource tree node information /// @@ -284,8 +278,7 @@ impl RbumSetTreeResp { /// Resource tree node information /// /// 资源树节点信息 -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object)] pub struct RbumSetTreeNodeResp { /// Node id /// @@ -343,8 +336,7 @@ pub struct RbumSetTreeNodeResp { /// Resource tree extension information /// /// 资源树扩展信息 -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object)] pub struct RbumSetTreeExtResp { /// 节点与资源项的关联信息 /// @@ -375,8 +367,7 @@ pub struct RbumSetTreeExtResp { /// Resource tree information /// /// 资源目录树信息 -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object)] pub struct RbumSetTreeCateResp { /// Resource cate tree node information /// @@ -388,8 +379,7 @@ pub struct RbumSetTreeCateResp { pub ext: Option, } -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object)] /// Resource tree cate structure information /// /// 资源树目录结构信息 diff --git a/backend/basic/src/rbum/dto/rbum_set_item_dto.rs b/backend/basic/src/rbum/dto/rbum_set_item_dto.rs index 581ca840e..c5d3331b0 100644 --- a/backend/basic/src/rbum/dto/rbum_set_item_dto.rs +++ b/backend/basic/src/rbum/dto/rbum_set_item_dto.rs @@ -10,8 +10,7 @@ use crate::rbum::rbum_enumeration::RbumScopeLevelKind; /// Add request for association between resource set category(node) and resource item /// /// 添加资源集分类(节点)挂载资源项的关联的请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumSetItemAddReq { /// Association sort /// @@ -37,8 +36,7 @@ pub struct RbumSetItemAddReq { /// Modify request for association between resource set category(node) and resource item /// /// 修改资源集分类(节点)挂载资源项的关联的请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct RbumSetItemModifyReq { /// Associated [resource set category(node)](crate::rbum::dto::rbum_set_cate_dto::RbumSetCateDetailResp) id /// @@ -54,8 +52,7 @@ pub struct RbumSetItemModifyReq { /// Summary information of the association between resource set category(node) and resource item /// /// 资源集分类(节点)挂载资源项的关联的概要信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumSetItemSummaryResp { /// Association id /// @@ -99,8 +96,7 @@ pub struct RbumSetItemSummaryResp { /// Resource item information of the association between resource set category(node) and resource item /// /// 资源集分类(节点)挂载资源项的关联的资源项信息 -#[derive(Serialize, Deserialize, Debug, Clone)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, Clone, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumSetItemRelInfoResp { /// Association id /// @@ -158,8 +154,7 @@ pub struct RbumSetItemRelInfoResp { /// Detail information of the association between resource set category(node) and resource item /// /// 资源集分类(节点)挂载资源项的关联的详细信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct RbumSetItemDetailResp { /// Association id /// diff --git a/backend/basic/src/rbum/rbum_enumeration.rs b/backend/basic/src/rbum/rbum_enumeration.rs index 0f35c924e..e86ef3bf2 100644 --- a/backend/basic/src/rbum/rbum_enumeration.rs +++ b/backend/basic/src/rbum/rbum_enumeration.rs @@ -14,8 +14,7 @@ use tardis::web::poem_openapi; /// Scope level kind /// /// 作用域层级类型 -#[derive(Display, Clone, Debug, PartialEq, Eq, Serialize)] -#[derive(poem_openapi::Enum)] +#[derive(Display, Clone, Debug, PartialEq, Eq, Serialize, poem_openapi::Enum)] pub enum RbumScopeLevelKind { /// Private /// @@ -90,7 +89,6 @@ impl RbumScopeLevelKind { } } - impl TryGetable for RbumScopeLevelKind { fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result { let s = i16::try_get(res, pre, col)?; @@ -106,8 +104,7 @@ impl TryGetable for RbumScopeLevelKind { /// /// /// 凭证关联的类型 -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[derive(poem_openapi::Enum)] +#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum)] pub enum RbumCertRelKind { /// Resource item /// @@ -142,7 +139,6 @@ impl RbumCertRelKind { } } - impl TryGetable for RbumCertRelKind { fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result { let s = i16::try_get(res, pre, col)?; @@ -157,8 +153,7 @@ impl TryGetable for RbumCertRelKind { /// Resource certificate configuration status kind /// /// 资源凭证配置状态类型 -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[derive(poem_openapi::Enum)] +#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum)] pub enum RbumCertConfStatusKind { /// Disabled /// @@ -190,8 +185,7 @@ impl RbumCertConfStatusKind { /// Resource certificate status kind /// /// 资源凭证状态类型 -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[derive(poem_openapi::Enum)] +#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum)] pub enum RbumCertStatusKind { /// Disabled /// @@ -226,7 +220,6 @@ impl RbumCertStatusKind { } } - impl TryGetable for RbumCertStatusKind { fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result { let s = i16::try_get(res, pre, col)?; @@ -241,8 +234,7 @@ impl TryGetable for RbumCertStatusKind { /// Resource relation kind /// /// 资源关联的类型 -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[derive(poem_openapi::Enum)] +#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum)] pub enum RbumRelFromKind { /// Resource item /// @@ -283,7 +275,6 @@ impl RbumRelFromKind { } } - impl TryGetable for RbumRelFromKind { fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result { let s = i16::try_get(res, pre, col)?; @@ -302,8 +293,7 @@ impl TryGetable for RbumRelFromKind { /// Used to associate resources with restrictions. /// /// 用于给资源关联加上限制条件。 -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[derive(poem_openapi::Enum)] +#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum)] pub enum RbumRelEnvKind { /// Datetime range /// @@ -368,7 +358,6 @@ impl RbumRelEnvKind { } } - impl TryGetable for RbumRelEnvKind { fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result { let s = i16::try_get(res, pre, col)?; @@ -383,8 +372,7 @@ impl TryGetable for RbumRelEnvKind { /// Resource set category(node) query kind /// /// 资源集分类(节点)的查询类型 -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[derive(poem_openapi::Enum)] +#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum)] pub enum RbumSetCateLevelQueryKind { /// Current layer and descendant layer /// @@ -411,8 +399,7 @@ pub enum RbumSetCateLevelQueryKind { /// Data kind /// /// 数据类型 -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[derive(poem_openapi::Enum, strum::EnumString)] +#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum, strum::EnumString)] pub enum RbumDataTypeKind { String, Number, @@ -429,7 +416,6 @@ pub enum RbumDataTypeKind { Label, } - impl TryGetable for RbumDataTypeKind { fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result { let s = String::try_get(res, pre, col)?; @@ -444,8 +430,7 @@ impl TryGetable for RbumDataTypeKind { /// Widget kind /// /// (前端)控件类型 -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[derive(poem_openapi::Enum, strum::EnumString)] +#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum, strum::EnumString)] pub enum RbumWidgetTypeKind { Input, InputTxt, @@ -477,7 +462,6 @@ pub enum RbumWidgetTypeKind { Group, } - impl TryGetable for RbumWidgetTypeKind { fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result { let s = String::try_get(res, pre, col)?; diff --git a/backend/basic/src/rbum/serv/rbum_crud_serv.rs b/backend/basic/src/rbum/serv/rbum_crud_serv.rs index 1beeef304..05113ff50 100644 --- a/backend/basic/src/rbum/serv/rbum_crud_serv.rs +++ b/backend/basic/src/rbum/serv/rbum_crud_serv.rs @@ -1121,8 +1121,7 @@ pub struct NameResp { pub name: String, } -#[derive(Debug, Serialize, Deserialize, sea_orm::FromQueryResult)] -#[derive(poem_openapi::Object)] +#[derive(Debug, Serialize, Deserialize, sea_orm::FromQueryResult, poem_openapi::Object)] pub struct IdNameResp { pub id: String, pub name: String, diff --git a/backend/basic/src/spi/dto/spi_bs_dto.rs b/backend/basic/src/spi/dto/spi_bs_dto.rs index 52e3ba7c0..34796baeb 100644 --- a/backend/basic/src/spi/dto/spi_bs_dto.rs +++ b/backend/basic/src/spi/dto/spi_bs_dto.rs @@ -11,8 +11,7 @@ use crate::spi::spi_funs; /// Add request for backend service /// /// 后端服务添加请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct SpiBsAddReq { /// Service name /// @@ -54,8 +53,7 @@ pub struct SpiBsAddReq { /// Modify request for backend service /// /// 后端服务修改请求 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)] pub struct SpiBsModifyReq { /// Service name /// @@ -99,8 +97,7 @@ pub struct SpiBsModifyReq { /// Backend service summary information /// /// 后端服务概要信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct SpiBsSummaryResp { /// Service Id /// @@ -159,8 +156,7 @@ pub struct SpiBsSummaryResp { /// Backend service detail information /// /// 后端服务详细信息 -#[derive(Serialize, Deserialize, Debug)] -#[derive(poem_openapi::Object, sea_orm::FromQueryResult)] +#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)] pub struct SpiBsDetailResp { /// Service Id /// @@ -260,8 +256,7 @@ impl SpiBsCertResp { /// Backend service query filter request /// /// 后端服务的查询过滤请求 -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -#[derive(poem_openapi::Object)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, poem_openapi::Object)] #[serde(default)] pub struct SpiBsFilterReq { /// Basic filter diff --git a/backend/basic/src/test.rs b/backend/basic/src/test.rs index 1fd8d3cff..065a10b96 100644 --- a/backend/basic/src/test.rs +++ b/backend/basic/src/test.rs @@ -1,4 +1,3 @@ - pub mod init_test_container; pub mod test_http_client; diff --git a/frontend/sdks/invoke/src/clients/spi_search_client.rs b/frontend/sdks/invoke/src/clients/spi_search_client.rs index d97c52be1..627080aa0 100644 --- a/frontend/sdks/invoke/src/clients/spi_search_client.rs +++ b/frontend/sdks/invoke/src/clients/spi_search_client.rs @@ -2,13 +2,12 @@ use tardis::basic::dto::TardisContext; use tardis::basic::result::TardisResult; use tardis::TardisFunsInst; - use crate::dto::search_item_dto::{SearchEventItemDeleteReq, SearchEventItemModifyReq, SearchItemAddReq, SearchItemModifyReq}; use crate::invoke_enumeration::InvokeModuleKind; use super::base_spi_client::BaseSpiClient; #[cfg(feature = "event")] -use super::event_client::{EventAttributeExt, EventCenterClient, mq_error, SPI_RPC_TOPIC, get_topic}; +use super::event_client::{get_topic, mq_error, EventAttributeExt, EventCenterClient, SPI_RPC_TOPIC}; use super::spi_kv_client::{KvItemAddOrModifyReq, KvItemDeleteReq, SpiKvClient}; pub struct SpiSearchClient; @@ -39,7 +38,7 @@ impl SpiSearchClient { pub async fn add_item_and_name(add_req: &SearchItemAddReq, name: Option, funs: &TardisFunsInst, ctx: &TardisContext) -> TardisResult<()> { #[cfg(feature = "event")] if let Some(_topic) = get_topic(&SPI_RPC_TOPIC) { - return EventCenterClient { topic_code: SPI_RPC_TOPIC }.add_item_and_name(add_req, name, funs, ctx).await + return EventCenterClient { topic_code: SPI_RPC_TOPIC }.add_item_and_name(add_req, name, funs, ctx).await; } let search_url: String = BaseSpiClient::module_url(InvokeModuleKind::Search, funs).await?; let headers = BaseSpiClient::headers(None, funs, ctx).await?; @@ -52,7 +51,7 @@ impl SpiSearchClient { pub async fn modify_item_and_name(tag: &str, key: &str, modify_req: &SearchItemModifyReq, funs: &TardisFunsInst, ctx: &TardisContext) -> TardisResult<()> { #[cfg(feature = "event")] if let Some(_topic) = get_topic(&SPI_RPC_TOPIC) { - return EventCenterClient { topic_code: SPI_RPC_TOPIC }.modify_item_and_name(tag, key, modify_req, funs, ctx).await + return EventCenterClient { topic_code: SPI_RPC_TOPIC }.modify_item_and_name(tag, key, modify_req, funs, ctx).await; } let search_url: String = BaseSpiClient::module_url(InvokeModuleKind::Search, funs).await?; let headers = BaseSpiClient::headers(None, funs, ctx).await?; @@ -67,7 +66,7 @@ impl SpiSearchClient { pub async fn delete_item_and_name(tag: &str, key: &str, funs: &TardisFunsInst, ctx: &TardisContext) -> TardisResult<()> { #[cfg(feature = "event")] if let Some(_topic) = get_topic(&SPI_RPC_TOPIC) { - return EventCenterClient { topic_code: SPI_RPC_TOPIC }.delete_item_and_name(tag, key, funs, ctx).await + return EventCenterClient { topic_code: SPI_RPC_TOPIC }.delete_item_and_name(tag, key, funs, ctx).await; } let search_url = BaseSpiClient::module_url(InvokeModuleKind::Search, funs).await?; let headers = BaseSpiClient::headers(None, funs, ctx).await?;