diff --git a/migrations/202208051000_api_kgon_synchronization/up.sql b/migrations/202208051000_api_kgon_synchronization/up.sql index ee53c7b..91e87c5 100644 --- a/migrations/202208051000_api_kgon_synchronization/up.sql +++ b/migrations/202208051000_api_kgon_synchronization/up.sql @@ -1,7 +1,7 @@ CREATE TABLE IF NOT EXISTS api_kgon_synchronizations ( id SERIAL PRIMARY KEY, item TEXT NOT NULL, - last_code BIGINT NOT NULL, + last_code INTEGER NOT NULL, synchronized_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000) ); diff --git a/migrations/202208051010_api_kgon_synchronization_history/up.sql b/migrations/202208051010_api_kgon_synchronization_history/up.sql index f1c7d99..85212a9 100644 --- a/migrations/202208051010_api_kgon_synchronization_history/up.sql +++ b/migrations/202208051010_api_kgon_synchronization_history/up.sql @@ -3,7 +3,7 @@ CREATE TABLE IF NOT EXISTS api_kgon_synchronization_history ( item TEXT NOT NULL, start_at BIGINT NOT NULL, complete_at BIGINT NOT NULL, - code BIGINT NOT NULL, + code INTEGER NOT NULL, message TEXT, created_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000) ); diff --git a/migrations/202208051200_api_kgon_member/up.sql b/migrations/202208051200_api_kgon_member/up.sql index 35fe26c..a62a6dc 100644 --- a/migrations/202208051200_api_kgon_member/up.sql +++ b/migrations/202208051200_api_kgon_member/up.sql @@ -1,9 +1,9 @@ CREATE TABLE IF NOT EXISTS api_kgon_members ( - id BIGINT NOT NULL, - balance BIGINT NOT NULL DEFAULT 0, - balance_bota BIGINT NOT NULL DEFAULT 0, - balance_sum BIGINT NOT NULL DEFAULT 0, - companies BIGINT NOT NULL DEFAULT 0, + id INTEGER NOT NULL, + balance INTEGER NOT NULL DEFAULT 0, + balance_bota INTEGER NOT NULL DEFAULT 0, + balance_sum INTEGER NOT NULL DEFAULT 0, + companies INTEGER NOT NULL DEFAULT 0, oriental_play BOOLEAN NOT NULL DEFAULT FALSE, member_id UUID NOT NULL, created_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000), diff --git a/migrations/202208051400_api_kgon_balance/up.sql b/migrations/202208051400_api_kgon_balance/up.sql index 14fa1d3..a656525 100644 --- a/migrations/202208051400_api_kgon_balance/up.sql +++ b/migrations/202208051400_api_kgon_balance/up.sql @@ -1,7 +1,7 @@ CREATE TABLE IF NOT EXISTS api_kgon_balances ( id SERIAL PRIMARY KEY, - balance BIGINT NOT NULL DEFAULT 0, - balance_bota BIGINT NOT NULL DEFAULT 0, + balance INTEGER NOT NULL DEFAULT 0, + balance_bota INTEGER NOT NULL DEFAULT 0, created_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000), updated_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000) ); diff --git a/migrations/202208061200_api_kgon_vendor/up.sql b/migrations/202208061200_api_kgon_vendor/up.sql index 4be6ecd..317d0f9 100644 --- a/migrations/202208061200_api_kgon_vendor/up.sql +++ b/migrations/202208061200_api_kgon_vendor/up.sql @@ -1,11 +1,11 @@ CREATE TABLE IF NOT EXISTS api_kgon_vendors ( - id BIGINT NOT NULL, - company_id BIGINT NOT NULL, - vendor_id BIGINT NOT NULL, - max_bet_casino BIGINT NOT NULL, - max_bet_slot BIGINT NOT NULL, + id INTEGER NOT NULL, + company_id INTEGER NOT NULL, + vendor_id INTEGER NOT NULL, + max_bet_casino INTEGER NOT NULL, + max_bet_slot INTEGER NOT NULL, is_enable CHAR(1) NOT NULL, - bet_count BIGINT NOT NULL, + bet_count INTEGER NOT NULL, key TEXT NOT NULL, name TEXT NOT NULL, category TEXT NOT NULL, diff --git a/migrations/202208061300_api_kgon_game/up.sql b/migrations/202208061300_api_kgon_game/up.sql index 57aa603..27dfd26 100644 --- a/migrations/202208061300_api_kgon_game/up.sql +++ b/migrations/202208061300_api_kgon_game/up.sql @@ -1,6 +1,6 @@ CREATE TABLE IF NOT EXISTS api_kgon_games ( - id BIGINT NOT NULL, - vendor_id BIGINT NOT NULL, + id INTEGER NOT NULL, + vendor_id INTEGER NOT NULL, key TEXT NOT NULL, names TEXT NOT NULL, platform TEXT NOT NULL, diff --git a/src/api/betting/models.rs b/src/api/betting/models.rs index 0320047..529e9b9 100644 --- a/src/api/betting/models.rs +++ b/src/api/betting/models.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; pub struct Error { - pub code: i64, + pub code: i32, pub msg: Option, } @@ -11,12 +11,12 @@ pub struct FindTransactionsRequest { pub edate: Option, pub group_key: Option, pub username: Option, - pub limit: i64, + pub limit: i32, } #[derive(Serialize, Deserialize, Debug)] pub struct FindTransactionsResponse { - pub code: i64, + pub code: i32, pub msg: Option, pub transactions: Vec, } @@ -27,7 +27,7 @@ pub struct FindPragmaticHistoryRequest { #[derive(Serialize, Deserialize, Debug)] pub struct FindPragmaticHistoryResponse { - pub code: i64, + pub code: i32, pub msg: Option, pub url: Option, } @@ -38,7 +38,7 @@ pub struct FindEvolutionTransactionDetailRequest { #[derive(Serialize, Deserialize, Debug)] pub struct FindEvolutionTransactionDetailResponse { - pub code: i64, + pub code: i32, pub msg: Option, pub transactions: Vec, } @@ -51,7 +51,7 @@ pub struct FindStatisticRequest { #[derive(Serialize, Deserialize, Debug)] pub struct FindStatisticResponse { - pub code: i64, + pub code: i32, pub msg: Option, pub data: Option, } diff --git a/src/api/core/models.rs b/src/api/core/models.rs index e1ece92..88344c1 100644 --- a/src/api/core/models.rs +++ b/src/api/core/models.rs @@ -1,5 +1,5 @@ #[derive(Debug)] pub struct Error { - pub code: i64, + pub code: i32, pub msg: Option, } diff --git a/src/api/game/models.rs b/src/api/game/models.rs index 74a9125..9a5e4f7 100644 --- a/src/api/game/models.rs +++ b/src/api/game/models.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; #[derive(Serialize, Deserialize, Debug)] pub struct Game { - pub id: i64, + pub id: i32, pub key: String, pub names: HashMap, pub platform: String, @@ -19,7 +19,7 @@ pub struct ListGamesRequest { #[derive(Serialize, Deserialize, Debug)] pub struct _ListGamesResponse { - pub code: i64, + pub code: i32, pub msg: Option, pub games: Vec, } @@ -36,23 +36,23 @@ pub struct PlayRequest { pub nickname: String, pub site_username: String, pub group_key: Option, - pub amount: i64, + pub amount: i32, pub request_key: Option, } #[derive(Serialize, Deserialize, Debug)] pub struct _PlayResponse { - pub code: i64, + pub code: i32, pub msg: Option, #[serde(rename = "userId")] pub user_id: String, pub url: String, - pub balance: i64, + pub balance: i32, } #[derive(Debug)] pub struct PlayResponse { pub user_id: String, pub url: String, - pub balance: i64, + pub balance: i32, } diff --git a/src/api/member/models.rs b/src/api/member/models.rs index 5deb137..ad42968 100644 --- a/src/api/member/models.rs +++ b/src/api/member/models.rs @@ -7,10 +7,10 @@ pub struct ListMembersRequest { #[derive(Serialize, Deserialize, Debug)] pub struct Member { - pub id: i64, + pub id: i32, pub username: String, - pub cash: i64, - pub cash_bota: i64, + pub cash: i32, + pub cash_bota: i32, pub nickname: String, pub site_username: String, pub group_key: Option, @@ -19,7 +19,7 @@ pub struct Member { #[derive(Serialize, Deserialize, Debug)] pub struct _ListMembersResponse { - pub code: i64, + pub code: i32, pub msg: Option, pub users: Vec, } @@ -39,7 +39,7 @@ pub struct SaveMemberRequest { #[derive(Serialize, Deserialize, Debug)] pub struct SaveMemberResponse { - pub code: i64, + pub code: i32, pub msg: Option, - pub id: Option, + pub id: Option, } diff --git a/src/api/member_account/models.rs b/src/api/member_account/models.rs index bd2fadc..7e388d4 100644 --- a/src/api/member_account/models.rs +++ b/src/api/member_account/models.rs @@ -6,50 +6,50 @@ pub struct GetBalanceForUserRequest { #[derive(Serialize, Deserialize, Debug)] pub struct _GetBalanceForUserResponse { - pub code: i64, + pub code: i32, pub msg: Option, - pub balance: i64, - pub balance_bota: i64, - pub balance_sum: i64, - pub companies: i64, + pub balance: i32, + pub balance_bota: i32, + pub balance_sum: i32, + pub companies: i32, } #[derive(Serialize, Deserialize, Debug)] pub struct GetBalanceForUserResponse { - pub balance: i64, - pub balance_bota: i64, - pub balance_sum: i64, - pub companies: i64, + pub balance: i32, + pub balance_bota: i32, + pub balance_sum: i32, + pub companies: i32, } pub struct GetBalanceForPartnerRequest {} #[derive(Serialize, Deserialize, Debug)] pub struct _GetBalanceForPartnerResponse { - pub code: i64, + pub code: i32, pub msg: Option, - pub balance: i64, - pub balance_bota: i64, + pub balance: i32, + pub balance_bota: i32, } #[derive(Serialize, Deserialize, Debug)] pub struct GetBalanceForPartnerResponse { - pub balance: i64, - pub balance_bota: i64, + pub balance: i32, + pub balance_bota: i32, } pub struct SaveDepositRequest { pub username: String, pub cash_type: Option, - pub amount: i64, + pub amount: i32, pub request_key: Option, } #[derive(Serialize, Deserialize, Debug)] pub struct SaveDepositResponse { - pub code: i64, + pub code: i32, pub msg: Option, - pub balance: i64, + pub balance: i32, } pub struct SaveWithdrawRequest { @@ -59,10 +59,10 @@ pub struct SaveWithdrawRequest { #[derive(Serialize, Deserialize, Debug)] pub struct SaveWithdrawResponse { - pub code: i64, + pub code: i32, pub msg: Option, - pub balance: i64, - pub balance_cash: i64, - pub balance_cash_bota: i64, - pub amount: i64, + pub balance: i32, + pub balance_cash: i32, + pub balance_cash_bota: i32, + pub amount: i32, } diff --git a/src/api/vendor/models.rs b/src/api/vendor/models.rs index bc918eb..8ddedb1 100644 --- a/src/api/vendor/models.rs +++ b/src/api/vendor/models.rs @@ -2,13 +2,13 @@ use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug)] pub struct Vendor { - pub id: i64, - pub company_id: i64, - pub vendor_id: i64, - pub max_bet_casino: i64, - pub max_bet_slot: i64, + pub id: i32, + pub company_id: i32, + pub vendor_id: i32, + pub max_bet_casino: i32, + pub max_bet_slot: i32, pub is_enable: String, - pub bet_count: i64, + pub bet_count: i32, pub key: String, pub name: String, pub category: String, @@ -18,7 +18,7 @@ pub struct ListVendorsRequest {} #[derive(Serialize, Deserialize, Debug)] pub struct _ListVendorsResponse { - pub code: i64, + pub code: i32, pub msg: Option, pub vendors: Vec, } diff --git a/src/repositories/balance/models.rs b/src/repositories/balance/models.rs index 312095f..e42c4ea 100644 --- a/src/repositories/balance/models.rs +++ b/src/repositories/balance/models.rs @@ -7,9 +7,9 @@ pub struct Balance { /// pub id: i32, /// - pub balance: i64, + pub balance: i32, /// - pub balance_bota: i64, + pub balance_bota: i32, /// pub created_at: i64, /// @@ -21,9 +21,9 @@ pub struct Balance { #[table_name = "api_kgon_balances"] pub struct NewBalance { /// - pub balance: i64, + pub balance: i32, /// - pub balance_bota: i64, + pub balance_bota: i32, } /// @@ -31,7 +31,7 @@ pub struct NewBalance { #[table_name = "api_kgon_balances"] pub struct ModifyBalance { /// - pub balance: i64, + pub balance: i32, /// - pub balance_bota: i64, + pub balance_bota: i32, } diff --git a/src/repositories/balance/schema.rs b/src/repositories/balance/schema.rs index 7c3226a..e82b352 100644 --- a/src/repositories/balance/schema.rs +++ b/src/repositories/balance/schema.rs @@ -7,9 +7,9 @@ table! { /// id -> Integer, /// - balance -> BigInt, + balance -> Integer, /// - balance_bota -> BigInt, + balance_bota -> Integer, /// created_at -> BigInt, /// diff --git a/src/repositories/game/models.rs b/src/repositories/game/models.rs index a762de6..d22796c 100644 --- a/src/repositories/game/models.rs +++ b/src/repositories/game/models.rs @@ -6,9 +6,9 @@ use beteran_common_rust as bcr; #[table_name = "api_kgon_games"] pub struct Game { /// - pub id: i64, + pub id: i32, /// - pub vendor_id: i64, + pub vendor_id: i32, /// pub key: String, /// @@ -32,9 +32,9 @@ pub struct Game { #[table_name = "api_kgon_games"] pub struct NewGame { /// - pub id: i64, + pub id: i32, /// - pub vendor_id: i64, + pub vendor_id: i32, /// pub key: String, /// @@ -72,9 +72,9 @@ pub struct ModifyGame { #[table_name = "api_kgon_games"] pub struct UpsertGame { /// - pub id: i64, + pub id: i32, /// - pub vendor_id: i64, + pub vendor_id: i32, /// pub key: String, /// @@ -93,7 +93,7 @@ pub struct UpsertGame { #[derive(Debug, Clone)] pub struct FindAllSearch { /// - pub vendor_id: Option, + pub vendor_id: Option, /// pub key_like: Option, /// diff --git a/src/repositories/game/repository.rs b/src/repositories/game/repository.rs index 2c48769..f074756 100644 --- a/src/repositories/game/repository.rs +++ b/src/repositories/game/repository.rs @@ -70,7 +70,7 @@ impl Repository { pub fn select( &self, conn: &diesel::PgConnection, - id: i64, + id: i32, ) -> Result, Error> { match api_kgon_games::table.find(id).first::(conn) { Ok(m) => Ok(Some(m)), @@ -206,7 +206,7 @@ impl Repository { pub fn update( &self, conn: &diesel::PgConnection, - id: i64, + id: i32, modify: &models::ModifyGame, ) -> Result { use api_kgon_games::dsl; @@ -218,7 +218,7 @@ impl Repository { } /// - pub fn delete(&self, conn: &diesel::PgConnection, id: i64) -> Result { + pub fn delete(&self, conn: &diesel::PgConnection, id: i32) -> Result { use api_kgon_games::dsl; diesel::delete(api_kgon_games::table.filter(dsl::id.eq(id))) diff --git a/src/repositories/game/schema.rs b/src/repositories/game/schema.rs index 4d5a2e0..682e676 100644 --- a/src/repositories/game/schema.rs +++ b/src/repositories/game/schema.rs @@ -5,9 +5,9 @@ table! { /// api_kgon_games(id) { /// - id -> BigInt, + id -> Integer, /// - vendor_id -> BigInt, + vendor_id -> Integer, /// key -> Text, /// diff --git a/src/repositories/member/models.rs b/src/repositories/member/models.rs index 947bdd9..aa12ad9 100644 --- a/src/repositories/member/models.rs +++ b/src/repositories/member/models.rs @@ -6,15 +6,15 @@ use beteran_common_rust as bcr; #[table_name = "api_kgon_members"] pub struct Member { /// - pub id: i64, + pub id: i32, /// - pub balance: i64, + pub balance: i32, /// - pub balance_bota: i64, + pub balance_bota: i32, /// - pub balance_sum: i64, + pub balance_sum: i32, /// - pub companies: i64, + pub companies: i32, /// pub oriental_play: String, /// @@ -30,15 +30,15 @@ pub struct Member { #[table_name = "api_kgon_members"] pub struct NewMember { /// - pub id: i64, + pub id: i32, /// - pub balance: i64, + pub balance: i32, /// - pub balance_bota: i64, + pub balance_bota: i32, /// - pub balance_sum: i64, + pub balance_sum: i32, /// - pub companies: i64, + pub companies: i32, /// pub oriental_play: String, /// @@ -50,9 +50,9 @@ pub struct NewMember { #[table_name = "api_kgon_members"] pub struct ModifyMember { /// - pub balance: i64, + pub balance: i32, /// - pub balance_bota: i64, + pub balance_bota: i32, /// pub oriental_play: String, } @@ -62,13 +62,13 @@ pub struct ModifyMember { #[table_name = "api_kgon_members"] pub struct ModifyMemberForBalance { /// - pub balance: i64, + pub balance: i32, /// - pub balance_bota: i64, + pub balance_bota: i32, /// - pub balance_sum: i64, + pub balance_sum: i32, /// - pub companies: i64, + pub companies: i32, } /// diff --git a/src/repositories/member/repository.rs b/src/repositories/member/repository.rs index 1898d6e..d51d3c3 100644 --- a/src/repositories/member/repository.rs +++ b/src/repositories/member/repository.rs @@ -43,7 +43,7 @@ impl Repository { pub fn select( &self, conn: &diesel::PgConnection, - id: i64, + id: i32, ) -> Result, Error> { match api_kgon_members::table .find(id) @@ -178,7 +178,7 @@ impl Repository { pub fn update( &self, conn: &diesel::PgConnection, - id: i64, + id: i32, modify: &models::ModifyMember, ) -> Result { use api_kgon_members::dsl; @@ -193,7 +193,7 @@ impl Repository { pub fn update_balance( &self, conn: &diesel::PgConnection, - id: i64, + id: i32, modify: &models::ModifyMemberForBalance, ) -> Result { use api_kgon_members::dsl; @@ -205,7 +205,7 @@ impl Repository { } /// - pub fn delete(&self, conn: &diesel::PgConnection, id: i64) -> Result { + pub fn delete(&self, conn: &diesel::PgConnection, id: i32) -> Result { use api_kgon_members::dsl; diesel::delete(api_kgon_members::table.filter(dsl::id.eq(id))) diff --git a/src/repositories/member/schema.rs b/src/repositories/member/schema.rs index dafaa84..eea1ac5 100644 --- a/src/repositories/member/schema.rs +++ b/src/repositories/member/schema.rs @@ -5,15 +5,15 @@ table! { /// api_kgon_members(id) { /// - id -> BigInt, + id -> Integer, /// - balance -> BigInt, + balance -> Integer, /// - balance_bota -> BigInt, + balance_bota -> Integer, /// - balance_sum -> BigInt, + balance_sum -> Integer, /// - companies -> BigInt, + companies -> Integer, /// oriental_play -> Text, /// diff --git a/src/repositories/synchronization_history/models.rs b/src/repositories/synchronization_history/models.rs index 5730800..d15ea79 100644 --- a/src/repositories/synchronization_history/models.rs +++ b/src/repositories/synchronization_history/models.rs @@ -14,7 +14,7 @@ pub struct SynchronizationHistory { /// pub complete_at: i64, /// - pub code: i64, + pub code: i32, /// pub message: Option, /// @@ -32,7 +32,7 @@ pub struct NewSynchronizationHistory { /// pub complete_at: i64, /// - pub code: i64, + pub code: i32, /// pub message: Option, } @@ -43,7 +43,7 @@ pub struct FindAllSearch { /// pub item: Option, /// - pub code: Option, + pub code: Option, } /// #[derive(Debug, Clone)] diff --git a/src/repositories/synchronization_history/schema.rs b/src/repositories/synchronization_history/schema.rs index 5be09b3..0852daf 100644 --- a/src/repositories/synchronization_history/schema.rs +++ b/src/repositories/synchronization_history/schema.rs @@ -13,7 +13,7 @@ table! { /// complete_at -> BigInt, /// - code -> BigInt, + code -> Integer, /// message -> Nullable, /// diff --git a/src/repositories/vendor/models.rs b/src/repositories/vendor/models.rs index f8ddb60..08f3d0e 100644 --- a/src/repositories/vendor/models.rs +++ b/src/repositories/vendor/models.rs @@ -6,11 +6,11 @@ use beteran_common_rust as bcr; #[table_name = "api_kgon_vendors"] pub struct Vendor { /// - pub id: i64, + pub id: i32, /// - pub company_id: i64, + pub company_id: i32, /// - pub vendor_id: i64, + pub vendor_id: i32, /// pub key: String, /// @@ -18,13 +18,13 @@ pub struct Vendor { /// pub category: String, /// - pub max_bet_casino: i64, + pub max_bet_casino: i32, /// - pub max_bet_slot: i64, + pub max_bet_slot: i32, /// pub is_enable: String, /// - pub bet_count: i64, + pub bet_count: i32, /// pub created_at: i64, /// @@ -36,11 +36,11 @@ pub struct Vendor { #[table_name = "api_kgon_vendors"] pub struct NewVendor { /// - pub id: i64, + pub id: i32, /// - pub company_id: i64, + pub company_id: i32, /// - pub vendor_id: i64, + pub vendor_id: i32, /// pub key: String, /// @@ -48,13 +48,13 @@ pub struct NewVendor { /// pub category: String, /// - pub max_bet_casino: i64, + pub max_bet_casino: i32, /// - pub max_bet_slot: i64, + pub max_bet_slot: i32, /// pub is_enable: String, /// - pub bet_count: i64, + pub bet_count: i32, } /// @@ -62,9 +62,9 @@ pub struct NewVendor { #[table_name = "api_kgon_vendors"] pub struct ModifyVendor { /// - pub company_id: i64, + pub company_id: i32, /// - pub vendor_id: i64, + pub vendor_id: i32, /// pub key: String, /// @@ -72,13 +72,13 @@ pub struct ModifyVendor { /// pub category: String, /// - pub max_bet_casino: i64, + pub max_bet_casino: i32, /// - pub max_bet_slot: i64, + pub max_bet_slot: i32, /// pub is_enable: String, /// - pub bet_count: i64, + pub bet_count: i32, } /// @@ -86,11 +86,11 @@ pub struct ModifyVendor { #[table_name = "api_kgon_vendors"] pub struct UpsertVendor { /// - pub id: i64, + pub id: i32, /// - pub company_id: i64, + pub company_id: i32, /// - pub vendor_id: i64, + pub vendor_id: i32, /// pub key: String, /// @@ -98,22 +98,22 @@ pub struct UpsertVendor { /// pub category: String, /// - pub max_bet_casino: i64, + pub max_bet_casino: i32, /// - pub max_bet_slot: i64, + pub max_bet_slot: i32, /// pub is_enable: String, /// - pub bet_count: i64, + pub bet_count: i32, } /// #[derive(Debug, Clone)] pub struct FindAllSearch { /// - pub company_id: Option, + pub company_id: Option, /// - pub vendor_id: Option, + pub vendor_id: Option, /// pub key_like: Option, /// diff --git a/src/repositories/vendor/repository.rs b/src/repositories/vendor/repository.rs index bbc70f1..157b2dc 100644 --- a/src/repositories/vendor/repository.rs +++ b/src/repositories/vendor/repository.rs @@ -72,7 +72,7 @@ impl Repository { pub fn select( &self, conn: &diesel::PgConnection, - id: i64, + id: i32, ) -> Result, Error> { match api_kgon_vendors::table .find(id) @@ -241,7 +241,7 @@ impl Repository { pub fn update( &self, conn: &diesel::PgConnection, - id: i64, + id: i32, modify: &models::ModifyVendor, ) -> Result { use api_kgon_vendors::dsl; @@ -253,7 +253,7 @@ impl Repository { } /// - pub fn delete(&self, conn: &diesel::PgConnection, id: i64) -> Result { + pub fn delete(&self, conn: &diesel::PgConnection, id: i32) -> Result { use api_kgon_vendors::dsl; diesel::delete(api_kgon_vendors::table.filter(dsl::id.eq(id))) diff --git a/src/repositories/vendor/schema.rs b/src/repositories/vendor/schema.rs index 1da6328..f834a52 100644 --- a/src/repositories/vendor/schema.rs +++ b/src/repositories/vendor/schema.rs @@ -5,11 +5,11 @@ table! { /// api_kgon_vendors(id) { /// - id -> BigInt, + id -> Integer, /// - company_id -> BigInt, + company_id -> Integer, /// - vendor_id -> BigInt, + vendor_id -> Integer, /// key -> Text, /// @@ -17,13 +17,13 @@ table! { /// category -> Text, /// - max_bet_casino -> BigInt, + max_bet_casino -> Integer, /// - max_bet_slot -> BigInt, + max_bet_slot -> Integer, /// is_enable -> Text, /// - bet_count -> BigInt, + bet_count -> Integer, /// created_at -> BigInt, /// diff --git a/src/schedulers/balance/scheduler.rs b/src/schedulers/balance/scheduler.rs index 9d78432..346d11d 100644 --- a/src/schedulers/balance/scheduler.rs +++ b/src/schedulers/balance/scheduler.rs @@ -68,7 +68,7 @@ impl Scheduler { &'static self, item: String, start_at: i64, - code: i64, + code: i32, message: Option, ) -> Result<(), Box> { let conn = self.pool.get().expect("conn"); diff --git a/src/schedulers/game/scheduler.rs b/src/schedulers/game/scheduler.rs index 44445d8..79c8f18 100644 --- a/src/schedulers/game/scheduler.rs +++ b/src/schedulers/game/scheduler.rs @@ -65,7 +65,7 @@ impl Scheduler { &'static self, item: String, start_at: i64, - code: i64, + code: i32, message: Option, ) -> Result<(), Box> { let complete_at = (chrono::Utc::now()).timestamp(); diff --git a/src/schedulers/member/scheduler.rs b/src/schedulers/member/scheduler.rs index 02e2f37..2e94154 100644 --- a/src/schedulers/member/scheduler.rs +++ b/src/schedulers/member/scheduler.rs @@ -63,7 +63,7 @@ impl Scheduler { &'static self, item: String, start_at: i64, - code: i64, + code: i32, message: Option, ) -> Result<(), Box> { let conn = self.pool.get().expect("conn"); diff --git a/src/schedulers/vendor/scheduler.rs b/src/schedulers/vendor/scheduler.rs index 13cda79..c8af2bb 100644 --- a/src/schedulers/vendor/scheduler.rs +++ b/src/schedulers/vendor/scheduler.rs @@ -63,7 +63,7 @@ impl Scheduler { &'static self, item: String, start_at: i64, - code: i64, + code: i32, message: Option, ) -> Result<(), Box> { let complete_at = (chrono::Utc::now()).timestamp(); diff --git a/src/services/game/service.rs b/src/services/game/service.rs index 4816011..fc06f9a 100644 --- a/src/services/game/service.rs +++ b/src/services/game/service.rs @@ -105,8 +105,8 @@ impl Service { search: match request.search { Some(s) => Some(repositories::vendor::models::FindAllSearch { name_like: s.name_like, - company_id: s.company_id.map(|d| d as i64), - vendor_id: s.vendor_id.map(|d| d as i64), + company_id: s.company_id.map(|d| d as i32), + vendor_id: s.vendor_id.map(|d| d as i32), key_like: s.key_like, category_like: s.category_like, is_enable: s.is_enable,