data type of money is changed

This commit is contained in:
병준 박 2022-08-30 08:14:53 +00:00
parent 5c005704c1
commit 97cbddd047
13 changed files with 32 additions and 32 deletions

View File

@ -36,7 +36,7 @@ tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
tokio-cron-scheduler = { version = "0" }
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-common-rust = { git = "https://gitlab.loafle.net/bet/beteran-common-rust.git", tag = "v0.1.69-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.70-snapshot" }
[build-dependencies]

View File

@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS member_bank_deposits (
id UUID DEFAULT uuid_generate_v4(),
member_id UUID NOT NULL,
name TEXT NOT NULL,
amount INTEGER NOT NULL,
amount DOUBLE PRECISION NOT NULL,
memo TEXT,
state MEMBER_BANK_DEPOSIT_STATE DEFAULT 'application',
state_changed_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000),

View File

@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS member_bank_withdraws (
bank_name TEXT NOT NULL,
name TEXT NOT NULL,
account_number TEXT NOT NULL,
amount INTEGER NOT NULL,
amount DOUBLE PRECISION NOT NULL,
password TEXT NOT NULL,
memo TEXT,
state MEMBER_BANK_WITHDRAW_STATE DEFAULT 'application',

View File

@ -5,7 +5,7 @@ use crate::repositories::member_bank_deposit::schema::MemberBankDepositState;
use diesel::deserialize::QueryableByName;
///
#[derive(Eq, Hash, PartialEq, Debug, Clone)]
#[derive(PartialEq, Debug, Clone)]
pub struct MemberBankDepositModel {
///
pub id: uuid::Uuid,
@ -14,7 +14,7 @@ pub struct MemberBankDepositModel {
///
pub name: String,
///
pub amount: i32,
pub amount: f64,
///
pub memo: Option<String>,
///

View File

@ -5,7 +5,7 @@ use crate::repositories::member_bank_withdraw::schema::MemberBankWithdrawState;
use diesel::deserialize::QueryableByName;
///
#[derive(Eq, Hash, PartialEq, Debug, Clone)]
#[derive(PartialEq, Debug, Clone)]
pub struct MemberBankWithdrawModel {
///
pub id: uuid::Uuid,
@ -18,7 +18,7 @@ pub struct MemberBankWithdrawModel {
///
pub account_number: String,
///
pub amount: i32,
pub amount: f64,
///
pub password: String,
///

View File

@ -2,7 +2,7 @@ use super::schema::{member_bank_deposits, MemberBankDepositState};
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"]
pub struct MemberBankDeposit {
///
@ -12,7 +12,7 @@ pub struct MemberBankDeposit {
///
pub name: String,
///
pub amount: i32,
pub amount: f64,
///
pub memo: Option<String>,
///
@ -34,7 +34,7 @@ pub struct NewMemberBankDeposit {
///
pub name: String,
///
pub amount: i32,
pub amount: f64,
///
pub memo: Option<String>,
}
@ -46,7 +46,7 @@ pub struct ModifyMemberBankDeposit {
///
pub name: String,
///
pub amount: i32,
pub amount: f64,
///
pub memo: Option<String>,
}
@ -67,7 +67,7 @@ pub struct FindAllSearch {
///
pub name_like: Option<String>,
///
pub amount: Option<i32>,
pub amount: Option<f64>,
///
pub memo_like: Option<String>,
///

View File

@ -10,7 +10,7 @@ pub enum MemberBankDepositState {
}
table! {
use diesel::sql_types::{Uuid, Text, BigInt, Nullable, Integer};
use diesel::sql_types::{Uuid, Text, BigInt, Nullable, Double};
use super::MemberBankDepositStateMapping;
///
@ -22,7 +22,7 @@ table! {
///
name -> Text,
///
amount -> Integer,
amount -> Double,
///
memo -> Nullable<Text>,
///

View File

@ -2,7 +2,7 @@ use super::schema::{member_bank_withdraws, MemberBankWithdrawState};
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"]
pub struct MemberBankWithdraw {
///
@ -16,7 +16,7 @@ pub struct MemberBankWithdraw {
///
pub account_number: String,
///
pub amount: i32,
pub amount: f64,
///
pub password: String,
///
@ -44,7 +44,7 @@ pub struct NewMemberBankWithdraw {
///
pub account_number: String,
///
pub amount: i32,
pub amount: f64,
///
pub password: String,
///
@ -62,7 +62,7 @@ pub struct ModifyMemberBankWithdraw {
///
pub account_number: String,
///
pub amount: i32,
pub amount: f64,
///
pub password: String,
///
@ -89,7 +89,7 @@ pub struct FindAllSearch {
///
pub account_number_like: Option<String>,
///
pub amount: Option<i32>,
pub amount: Option<f64>,
///
pub memo_like: Option<String>,
///

View File

@ -10,7 +10,7 @@ pub enum MemberBankWithdrawState {
}
table! {
use diesel::sql_types::{Uuid, Text, BigInt, Nullable, Integer};
use diesel::sql_types::{Uuid, Text, BigInt, Nullable, Double};
use super::MemberBankWithdrawStateMapping;
///
@ -26,7 +26,7 @@ table! {
///
account_number -> Text,
///
amount -> Integer,
amount -> Double,
///
password -> Text,
///

View File

@ -10,7 +10,7 @@ impl From<&repositories::member_bank_deposit::models::MemberBankDeposit>
id: d.id.to_string(),
member_id: d.member_id.to_string(),
name: d.name.clone(),
amount: d.amount as u32,
amount: d.amount,
memo: d.memo.clone(),
state: d.state as i32,
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(),
member: Some(bpr::models::member::Member::from(&d.member)),
name: d.name.clone(),
amount: d.amount as u32,
amount: d.amount,
memo: d.memo.clone(),
state: d.state as i32,
state_changed_at: d.state_changed_at as u64,

View File

@ -177,7 +177,7 @@ impl Service {
&repositories::member_bank_deposit::models::NewMemberBankDeposit {
member_id,
name: request.name,
amount: request.amount as i32,
amount: request.amount,
memo: request.memo,
},
)
@ -323,7 +323,7 @@ impl Service {
Some(repositories::member_bank_deposit::models::FindAllSearch {
member_id,
name_like: s.name_like,
amount: s.amount.map(|d| d as i32),
amount: s.amount,
memo_like: s.memo_like,
state: s.state.map(|d| {
repositories::member_bank_deposit::schema::MemberBankDepositState::from(d)
@ -624,7 +624,7 @@ impl Service {
let modify_member_bank_deposit =
repositories::member_bank_deposit::models::ModifyMemberBankDeposit {
name: request.name,
amount: request.amount as i32,
amount: request.amount,
memo: request.memo,
};

View File

@ -13,7 +13,7 @@ impl From<&repositories::member_bank_withdraw::models::MemberBankWithdraw>
account_number: d.account_number.clone(),
password: d.password.clone(),
name: d.name.clone(),
amount: d.amount as u32,
amount: d.amount,
memo: d.memo.clone(),
state: d.state as i32,
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(),
password: d.password.clone(),
name: d.name.clone(),
amount: d.amount as u32,
amount: d.amount,
memo: d.memo.clone(),
state: d.state as i32,
state_changed_at: d.state_changed_at as u64,

View File

@ -175,7 +175,7 @@ impl Service {
bank_name: request.bank_name,
name: request.name,
account_number: request.account_number,
amount: request.amount as i32,
amount: request.amount,
password: request.password,
memo: request.memo,
};
@ -326,7 +326,7 @@ impl Service {
bank_name_like: s.bank_name_like,
name_like: s.name_like,
account_number_like: s.account_number_like,
amount: s.amount.map(|d| d as i32),
amount: s.amount,
memo_like: s.memo_like,
state: s.state.map(|d| {
repositories::member_bank_withdraw::schema::MemberBankWithdrawState::from(d)
@ -629,7 +629,7 @@ impl Service {
bank_name: request.bank_name,
name: request.name,
account_number: request.account_number,
amount: request.amount as i32,
amount: request.amount,
password: request.password,
memo: request.memo,
};