data type of money is changed
This commit is contained in:
parent
5c005704c1
commit
97cbddd047
|
@ -36,7 +36,7 @@ tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
|
||||||
tokio-cron-scheduler = { version = "0" }
|
tokio-cron-scheduler = { version = "0" }
|
||||||
uuid = { version = "0", features = ["serde", "v4", "v5"] }
|
uuid = { version = "0", features = ["serde", "v4", "v5"] }
|
||||||
|
|
||||||
beteran-protobuf-rust = { git = "https://gitlab.loafle.net/bet/beteran-protobuf-rust.git", tag = "v0.1.83-snapshot" }
|
beteran-protobuf-rust = { git = "https://gitlab.loafle.net/bet/beteran-protobuf-rust.git", tag = "v0.1.84-snapshot" }
|
||||||
beteran-common-rust = { git = "https://gitlab.loafle.net/bet/beteran-common-rust.git", tag = "v0.1.69-snapshot" }
|
beteran-common-rust = { git = "https://gitlab.loafle.net/bet/beteran-common-rust.git", tag = "v0.1.70-snapshot" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS member_bank_deposits (
|
||||||
id UUID DEFAULT uuid_generate_v4(),
|
id UUID DEFAULT uuid_generate_v4(),
|
||||||
member_id UUID NOT NULL,
|
member_id UUID NOT NULL,
|
||||||
name TEXT NOT NULL,
|
name TEXT NOT NULL,
|
||||||
amount INTEGER NOT NULL,
|
amount DOUBLE PRECISION NOT NULL,
|
||||||
memo TEXT,
|
memo TEXT,
|
||||||
state MEMBER_BANK_DEPOSIT_STATE DEFAULT 'application',
|
state MEMBER_BANK_DEPOSIT_STATE DEFAULT 'application',
|
||||||
state_changed_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000),
|
state_changed_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000),
|
||||||
|
|
|
@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS member_bank_withdraws (
|
||||||
bank_name TEXT NOT NULL,
|
bank_name TEXT NOT NULL,
|
||||||
name TEXT NOT NULL,
|
name TEXT NOT NULL,
|
||||||
account_number TEXT NOT NULL,
|
account_number TEXT NOT NULL,
|
||||||
amount INTEGER NOT NULL,
|
amount DOUBLE PRECISION NOT NULL,
|
||||||
password TEXT NOT NULL,
|
password TEXT NOT NULL,
|
||||||
memo TEXT,
|
memo TEXT,
|
||||||
state MEMBER_BANK_WITHDRAW_STATE DEFAULT 'application',
|
state MEMBER_BANK_WITHDRAW_STATE DEFAULT 'application',
|
||||||
|
|
|
@ -5,7 +5,7 @@ use crate::repositories::member_bank_deposit::schema::MemberBankDepositState;
|
||||||
use diesel::deserialize::QueryableByName;
|
use diesel::deserialize::QueryableByName;
|
||||||
|
|
||||||
///
|
///
|
||||||
#[derive(Eq, Hash, PartialEq, Debug, Clone)]
|
#[derive(PartialEq, Debug, Clone)]
|
||||||
pub struct MemberBankDepositModel {
|
pub struct MemberBankDepositModel {
|
||||||
///
|
///
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
|
@ -14,7 +14,7 @@ pub struct MemberBankDepositModel {
|
||||||
///
|
///
|
||||||
pub name: String,
|
pub name: String,
|
||||||
///
|
///
|
||||||
pub amount: i32,
|
pub amount: f64,
|
||||||
///
|
///
|
||||||
pub memo: Option<String>,
|
pub memo: Option<String>,
|
||||||
///
|
///
|
||||||
|
|
|
@ -5,7 +5,7 @@ use crate::repositories::member_bank_withdraw::schema::MemberBankWithdrawState;
|
||||||
use diesel::deserialize::QueryableByName;
|
use diesel::deserialize::QueryableByName;
|
||||||
|
|
||||||
///
|
///
|
||||||
#[derive(Eq, Hash, PartialEq, Debug, Clone)]
|
#[derive(PartialEq, Debug, Clone)]
|
||||||
pub struct MemberBankWithdrawModel {
|
pub struct MemberBankWithdrawModel {
|
||||||
///
|
///
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
|
@ -18,7 +18,7 @@ pub struct MemberBankWithdrawModel {
|
||||||
///
|
///
|
||||||
pub account_number: String,
|
pub account_number: String,
|
||||||
///
|
///
|
||||||
pub amount: i32,
|
pub amount: f64,
|
||||||
///
|
///
|
||||||
pub password: String,
|
pub password: String,
|
||||||
///
|
///
|
||||||
|
|
|
@ -2,7 +2,7 @@ use super::schema::{member_bank_deposits, MemberBankDepositState};
|
||||||
use beteran_common_rust as bcr;
|
use beteran_common_rust as bcr;
|
||||||
|
|
||||||
///
|
///
|
||||||
#[derive(Eq, Hash, Identifiable, Queryable, PartialEq, Debug, Clone)]
|
#[derive(Identifiable, Queryable, PartialEq, Debug, Clone)]
|
||||||
#[table_name = "member_bank_deposits"]
|
#[table_name = "member_bank_deposits"]
|
||||||
pub struct MemberBankDeposit {
|
pub struct MemberBankDeposit {
|
||||||
///
|
///
|
||||||
|
@ -12,7 +12,7 @@ pub struct MemberBankDeposit {
|
||||||
///
|
///
|
||||||
pub name: String,
|
pub name: String,
|
||||||
///
|
///
|
||||||
pub amount: i32,
|
pub amount: f64,
|
||||||
///
|
///
|
||||||
pub memo: Option<String>,
|
pub memo: Option<String>,
|
||||||
///
|
///
|
||||||
|
@ -34,7 +34,7 @@ pub struct NewMemberBankDeposit {
|
||||||
///
|
///
|
||||||
pub name: String,
|
pub name: String,
|
||||||
///
|
///
|
||||||
pub amount: i32,
|
pub amount: f64,
|
||||||
///
|
///
|
||||||
pub memo: Option<String>,
|
pub memo: Option<String>,
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ pub struct ModifyMemberBankDeposit {
|
||||||
///
|
///
|
||||||
pub name: String,
|
pub name: String,
|
||||||
///
|
///
|
||||||
pub amount: i32,
|
pub amount: f64,
|
||||||
///
|
///
|
||||||
pub memo: Option<String>,
|
pub memo: Option<String>,
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ pub struct FindAllSearch {
|
||||||
///
|
///
|
||||||
pub name_like: Option<String>,
|
pub name_like: Option<String>,
|
||||||
///
|
///
|
||||||
pub amount: Option<i32>,
|
pub amount: Option<f64>,
|
||||||
///
|
///
|
||||||
pub memo_like: Option<String>,
|
pub memo_like: Option<String>,
|
||||||
///
|
///
|
||||||
|
|
|
@ -10,7 +10,7 @@ pub enum MemberBankDepositState {
|
||||||
}
|
}
|
||||||
|
|
||||||
table! {
|
table! {
|
||||||
use diesel::sql_types::{Uuid, Text, BigInt, Nullable, Integer};
|
use diesel::sql_types::{Uuid, Text, BigInt, Nullable, Double};
|
||||||
use super::MemberBankDepositStateMapping;
|
use super::MemberBankDepositStateMapping;
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -22,7 +22,7 @@ table! {
|
||||||
///
|
///
|
||||||
name -> Text,
|
name -> Text,
|
||||||
///
|
///
|
||||||
amount -> Integer,
|
amount -> Double,
|
||||||
///
|
///
|
||||||
memo -> Nullable<Text>,
|
memo -> Nullable<Text>,
|
||||||
///
|
///
|
||||||
|
|
|
@ -2,7 +2,7 @@ use super::schema::{member_bank_withdraws, MemberBankWithdrawState};
|
||||||
use beteran_common_rust as bcr;
|
use beteran_common_rust as bcr;
|
||||||
|
|
||||||
///
|
///
|
||||||
#[derive(Eq, Hash, Identifiable, Queryable, PartialEq, Debug, Clone)]
|
#[derive(Identifiable, Queryable, PartialEq, Debug, Clone)]
|
||||||
#[table_name = "member_bank_withdraws"]
|
#[table_name = "member_bank_withdraws"]
|
||||||
pub struct MemberBankWithdraw {
|
pub struct MemberBankWithdraw {
|
||||||
///
|
///
|
||||||
|
@ -16,7 +16,7 @@ pub struct MemberBankWithdraw {
|
||||||
///
|
///
|
||||||
pub account_number: String,
|
pub account_number: String,
|
||||||
///
|
///
|
||||||
pub amount: i32,
|
pub amount: f64,
|
||||||
///
|
///
|
||||||
pub password: String,
|
pub password: String,
|
||||||
///
|
///
|
||||||
|
@ -44,7 +44,7 @@ pub struct NewMemberBankWithdraw {
|
||||||
///
|
///
|
||||||
pub account_number: String,
|
pub account_number: String,
|
||||||
///
|
///
|
||||||
pub amount: i32,
|
pub amount: f64,
|
||||||
///
|
///
|
||||||
pub password: String,
|
pub password: String,
|
||||||
///
|
///
|
||||||
|
@ -62,7 +62,7 @@ pub struct ModifyMemberBankWithdraw {
|
||||||
///
|
///
|
||||||
pub account_number: String,
|
pub account_number: String,
|
||||||
///
|
///
|
||||||
pub amount: i32,
|
pub amount: f64,
|
||||||
///
|
///
|
||||||
pub password: String,
|
pub password: String,
|
||||||
///
|
///
|
||||||
|
@ -89,7 +89,7 @@ pub struct FindAllSearch {
|
||||||
///
|
///
|
||||||
pub account_number_like: Option<String>,
|
pub account_number_like: Option<String>,
|
||||||
///
|
///
|
||||||
pub amount: Option<i32>,
|
pub amount: Option<f64>,
|
||||||
///
|
///
|
||||||
pub memo_like: Option<String>,
|
pub memo_like: Option<String>,
|
||||||
///
|
///
|
||||||
|
|
|
@ -10,7 +10,7 @@ pub enum MemberBankWithdrawState {
|
||||||
}
|
}
|
||||||
|
|
||||||
table! {
|
table! {
|
||||||
use diesel::sql_types::{Uuid, Text, BigInt, Nullable, Integer};
|
use diesel::sql_types::{Uuid, Text, BigInt, Nullable, Double};
|
||||||
use super::MemberBankWithdrawStateMapping;
|
use super::MemberBankWithdrawStateMapping;
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -26,7 +26,7 @@ table! {
|
||||||
///
|
///
|
||||||
account_number -> Text,
|
account_number -> Text,
|
||||||
///
|
///
|
||||||
amount -> Integer,
|
amount -> Double,
|
||||||
///
|
///
|
||||||
password -> Text,
|
password -> Text,
|
||||||
///
|
///
|
||||||
|
|
|
@ -10,7 +10,7 @@ impl From<&repositories::member_bank_deposit::models::MemberBankDeposit>
|
||||||
id: d.id.to_string(),
|
id: d.id.to_string(),
|
||||||
member_id: d.member_id.to_string(),
|
member_id: d.member_id.to_string(),
|
||||||
name: d.name.clone(),
|
name: d.name.clone(),
|
||||||
amount: d.amount as u32,
|
amount: d.amount,
|
||||||
memo: d.memo.clone(),
|
memo: d.memo.clone(),
|
||||||
state: d.state as i32,
|
state: d.state as i32,
|
||||||
state_changed_at: d.state_changed_at as u64,
|
state_changed_at: d.state_changed_at as u64,
|
||||||
|
@ -28,7 +28,7 @@ impl From<&compositions::member_bank_deposit::models::MemberBankDepositModel>
|
||||||
id: d.id.to_string(),
|
id: d.id.to_string(),
|
||||||
member: Some(bpr::models::member::Member::from(&d.member)),
|
member: Some(bpr::models::member::Member::from(&d.member)),
|
||||||
name: d.name.clone(),
|
name: d.name.clone(),
|
||||||
amount: d.amount as u32,
|
amount: d.amount,
|
||||||
memo: d.memo.clone(),
|
memo: d.memo.clone(),
|
||||||
state: d.state as i32,
|
state: d.state as i32,
|
||||||
state_changed_at: d.state_changed_at as u64,
|
state_changed_at: d.state_changed_at as u64,
|
||||||
|
|
|
@ -177,7 +177,7 @@ impl Service {
|
||||||
&repositories::member_bank_deposit::models::NewMemberBankDeposit {
|
&repositories::member_bank_deposit::models::NewMemberBankDeposit {
|
||||||
member_id,
|
member_id,
|
||||||
name: request.name,
|
name: request.name,
|
||||||
amount: request.amount as i32,
|
amount: request.amount,
|
||||||
memo: request.memo,
|
memo: request.memo,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -323,7 +323,7 @@ impl Service {
|
||||||
Some(repositories::member_bank_deposit::models::FindAllSearch {
|
Some(repositories::member_bank_deposit::models::FindAllSearch {
|
||||||
member_id,
|
member_id,
|
||||||
name_like: s.name_like,
|
name_like: s.name_like,
|
||||||
amount: s.amount.map(|d| d as i32),
|
amount: s.amount,
|
||||||
memo_like: s.memo_like,
|
memo_like: s.memo_like,
|
||||||
state: s.state.map(|d| {
|
state: s.state.map(|d| {
|
||||||
repositories::member_bank_deposit::schema::MemberBankDepositState::from(d)
|
repositories::member_bank_deposit::schema::MemberBankDepositState::from(d)
|
||||||
|
@ -624,7 +624,7 @@ impl Service {
|
||||||
let modify_member_bank_deposit =
|
let modify_member_bank_deposit =
|
||||||
repositories::member_bank_deposit::models::ModifyMemberBankDeposit {
|
repositories::member_bank_deposit::models::ModifyMemberBankDeposit {
|
||||||
name: request.name,
|
name: request.name,
|
||||||
amount: request.amount as i32,
|
amount: request.amount,
|
||||||
memo: request.memo,
|
memo: request.memo,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ impl From<&repositories::member_bank_withdraw::models::MemberBankWithdraw>
|
||||||
account_number: d.account_number.clone(),
|
account_number: d.account_number.clone(),
|
||||||
password: d.password.clone(),
|
password: d.password.clone(),
|
||||||
name: d.name.clone(),
|
name: d.name.clone(),
|
||||||
amount: d.amount as u32,
|
amount: d.amount,
|
||||||
memo: d.memo.clone(),
|
memo: d.memo.clone(),
|
||||||
state: d.state as i32,
|
state: d.state as i32,
|
||||||
state_changed_at: d.state_changed_at as u64,
|
state_changed_at: d.state_changed_at as u64,
|
||||||
|
@ -34,7 +34,7 @@ impl From<&compositions::member_bank_withdraw::models::MemberBankWithdrawModel>
|
||||||
account_number: d.account_number.clone(),
|
account_number: d.account_number.clone(),
|
||||||
password: d.password.clone(),
|
password: d.password.clone(),
|
||||||
name: d.name.clone(),
|
name: d.name.clone(),
|
||||||
amount: d.amount as u32,
|
amount: d.amount,
|
||||||
memo: d.memo.clone(),
|
memo: d.memo.clone(),
|
||||||
state: d.state as i32,
|
state: d.state as i32,
|
||||||
state_changed_at: d.state_changed_at as u64,
|
state_changed_at: d.state_changed_at as u64,
|
||||||
|
|
|
@ -175,7 +175,7 @@ impl Service {
|
||||||
bank_name: request.bank_name,
|
bank_name: request.bank_name,
|
||||||
name: request.name,
|
name: request.name,
|
||||||
account_number: request.account_number,
|
account_number: request.account_number,
|
||||||
amount: request.amount as i32,
|
amount: request.amount,
|
||||||
password: request.password,
|
password: request.password,
|
||||||
memo: request.memo,
|
memo: request.memo,
|
||||||
};
|
};
|
||||||
|
@ -326,7 +326,7 @@ impl Service {
|
||||||
bank_name_like: s.bank_name_like,
|
bank_name_like: s.bank_name_like,
|
||||||
name_like: s.name_like,
|
name_like: s.name_like,
|
||||||
account_number_like: s.account_number_like,
|
account_number_like: s.account_number_like,
|
||||||
amount: s.amount.map(|d| d as i32),
|
amount: s.amount,
|
||||||
memo_like: s.memo_like,
|
memo_like: s.memo_like,
|
||||||
state: s.state.map(|d| {
|
state: s.state.map(|d| {
|
||||||
repositories::member_bank_withdraw::schema::MemberBankWithdrawState::from(d)
|
repositories::member_bank_withdraw::schema::MemberBankWithdrawState::from(d)
|
||||||
|
@ -629,7 +629,7 @@ impl Service {
|
||||||
bank_name: request.bank_name,
|
bank_name: request.bank_name,
|
||||||
name: request.name,
|
name: request.name,
|
||||||
account_number: request.account_number,
|
account_number: request.account_number,
|
||||||
amount: request.amount as i32,
|
amount: request.amount,
|
||||||
password: request.password,
|
password: request.password,
|
||||||
memo: request.memo,
|
memo: request.memo,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user