diff --git a/Cargo.toml b/Cargo.toml index 3277e72..6845f6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ tokio = { version = "1", features = ["macros", "rt-multi-thread"] } tokio-cron-scheduler = { version = "*" } uuid = { version = "0", features = ["serde", "v4", "v5"] } -beteran-protobuf-rust = { git = "https://gitlab.loafle.net/bet/beteran-protobuf-rust.git", tag = "v0.1.74-snapshot" } -beteran-common-rust = { git = "https://gitlab.loafle.net/bet/beteran-common-rust.git", tag = "v0.1.58-snapshot" } +beteran-protobuf-rust = { git = "https://gitlab.loafle.net/bet/beteran-protobuf-rust.git", tag = "v0.1.77-snapshot" } +beteran-common-rust = { git = "https://gitlab.loafle.net/bet/beteran-common-rust.git", tag = "v0.1.62-snapshot" } [build-dependencies] diff --git a/src/repositories/game/models.rs b/src/repositories/game/models.rs index a762de6..39f36e1 100644 --- a/src/repositories/game/models.rs +++ b/src/repositories/game/models.rs @@ -108,7 +108,7 @@ pub struct FindAllSearch { pub struct FindAll { pub search: Option, /// - pub pagination: Option, + pub pagination: Option, /// - pub sorts: Option>, + pub sorts: Option>, } diff --git a/src/repositories/game/repository.rs b/src/repositories/game/repository.rs index 2c48769..a5f8d31 100644 --- a/src/repositories/game/repository.rs +++ b/src/repositories/game/repository.rs @@ -147,7 +147,7 @@ impl Repository { if let Some(orderbys) = &find_all.sorts { for s in orderbys { match s { - bcr::models::pagination::Sort::ASC(property) => match property.as_str() { + bcr::pagination::Sort::ASC(property) => match property.as_str() { "vendor_id" => { q = q.order_by(api_kgon_games::vendor_id.asc()); } @@ -171,7 +171,7 @@ impl Repository { } _ => {} }, - bcr::models::pagination::Sort::DESC(property) => match property.as_str() { + bcr::pagination::Sort::DESC(property) => match property.as_str() { "vendor_id" => { q = q.order_by(api_kgon_games::vendor_id.desc()); } diff --git a/src/repositories/member/models.rs b/src/repositories/member/models.rs index 83c42a5..9ca5490 100644 --- a/src/repositories/member/models.rs +++ b/src/repositories/member/models.rs @@ -72,7 +72,7 @@ pub struct FindAllSearch { pub struct FindAll { pub search: Option, /// - pub pagination: Option, + pub pagination: Option, /// - pub sorts: Option>, + pub sorts: Option>, } diff --git a/src/repositories/member/repository.rs b/src/repositories/member/repository.rs index 1898d6e..99a23d4 100644 --- a/src/repositories/member/repository.rs +++ b/src/repositories/member/repository.rs @@ -119,7 +119,7 @@ impl Repository { if let Some(orderbys) = &find_all.sorts { for s in orderbys { match s { - bcr::models::pagination::Sort::ASC(property) => match property.as_str() { + bcr::pagination::Sort::ASC(property) => match property.as_str() { "balance" => { q = q.order_by(api_kgon_members::balance.asc()); } @@ -143,7 +143,7 @@ impl Repository { } _ => {} }, - bcr::models::pagination::Sort::DESC(property) => match property.as_str() { + bcr::pagination::Sort::DESC(property) => match property.as_str() { "balance" => { q = q.order_by(api_kgon_members::balance.desc()); } diff --git a/src/repositories/synchronization_history/models.rs b/src/repositories/synchronization_history/models.rs index 5730800..2a7ac9b 100644 --- a/src/repositories/synchronization_history/models.rs +++ b/src/repositories/synchronization_history/models.rs @@ -50,7 +50,7 @@ pub struct FindAllSearch { pub struct FindAll { pub search: Option, /// - pub pagination: Option, + pub pagination: Option, /// - pub sorts: Option>, + pub sorts: Option>, } diff --git a/src/repositories/synchronization_history/repository.rs b/src/repositories/synchronization_history/repository.rs index 7859648..9583495 100644 --- a/src/repositories/synchronization_history/repository.rs +++ b/src/repositories/synchronization_history/repository.rs @@ -106,7 +106,7 @@ impl Repository { if let Some(orderbys) = &find_all.sorts { for s in orderbys { match s { - bcr::models::pagination::Sort::ASC(property) => match property.as_str() { + bcr::pagination::Sort::ASC(property) => match property.as_str() { "item" => { q = q.order_by(api_kgon_synchronization_history::item.asc()); } @@ -124,7 +124,7 @@ impl Repository { } _ => {} }, - bcr::models::pagination::Sort::DESC(property) => match property.as_str() { + bcr::pagination::Sort::DESC(property) => match property.as_str() { "item" => { q = q.order_by(api_kgon_synchronization_history::item.desc()); } diff --git a/src/repositories/vendor/models.rs b/src/repositories/vendor/models.rs index f8ddb60..387913f 100644 --- a/src/repositories/vendor/models.rs +++ b/src/repositories/vendor/models.rs @@ -128,7 +128,7 @@ pub struct FindAllSearch { pub struct FindAll { pub search: Option, /// - pub pagination: Option, + pub pagination: Option, /// - pub sorts: Option>, + pub sorts: Option>, } diff --git a/src/repositories/vendor/repository.rs b/src/repositories/vendor/repository.rs index bbc70f1..2df4805 100644 --- a/src/repositories/vendor/repository.rs +++ b/src/repositories/vendor/repository.rs @@ -158,7 +158,7 @@ impl Repository { if let Some(orderbys) = &find_all.sorts { for s in orderbys { match s { - bcr::models::pagination::Sort::ASC(property) => match property.as_str() { + bcr::pagination::Sort::ASC(property) => match property.as_str() { "company_id" => { q = q.order_by(api_kgon_vendors::company_id.asc()); } @@ -194,7 +194,7 @@ impl Repository { } _ => {} }, - bcr::models::pagination::Sort::DESC(property) => match property.as_str() { + bcr::pagination::Sort::DESC(property) => match property.as_str() { "company_id" => { q = q.order_by(api_kgon_vendors::company_id.desc()); } diff --git a/src/services/game/service.rs b/src/services/game/service.rs index f7f9b8f..3f339a8 100644 --- a/src/services/game/service.rs +++ b/src/services/game/service.rs @@ -115,12 +115,12 @@ impl Service { pagination: request .pagination .as_ref() - .map(bcr::models::pagination::Pagination::from), + .map(bcr::pagination::Pagination::from), sorts: Some( request .sorts .iter() - .map(beteran_common_rust::models::pagination::Sort::from) + .map(bcr::pagination::Sort::from) .collect(), ), }; diff --git a/src/services/vendor/service.rs b/src/services/vendor/service.rs index c236843..99288aa 100644 --- a/src/services/vendor/service.rs +++ b/src/services/vendor/service.rs @@ -116,12 +116,12 @@ impl Service { pagination: request .pagination .as_ref() - .map(bcr::models::pagination::Pagination::from), + .map(bcr::pagination::Pagination::from), sorts: Some( request .sorts .iter() - .map(beteran_common_rust::models::pagination::Sort::from) + .map(bcr::pagination::Sort::from) .collect(), ), };