109 lines
2.0 KiB
Rust
109 lines
2.0 KiB
Rust
use super::schema::{member_bank_withdraws, MemberBankWithdrawState};
|
|
use beteran_common_rust as bcr;
|
|
|
|
///
|
|
#[derive(Identifiable, Queryable, PartialEq, Debug, Clone)]
|
|
#[table_name = "member_bank_withdraws"]
|
|
pub struct MemberBankWithdraw {
|
|
///
|
|
pub id: uuid::Uuid,
|
|
///
|
|
pub member_id: uuid::Uuid,
|
|
///
|
|
pub bank_name: String,
|
|
///
|
|
pub name: String,
|
|
///
|
|
pub account_number: String,
|
|
///
|
|
pub amount: f64,
|
|
///
|
|
pub password: String,
|
|
///
|
|
pub memo: Option<String>,
|
|
///
|
|
pub state: MemberBankWithdrawState,
|
|
///
|
|
pub state_changed_at: i64,
|
|
///
|
|
pub created_at: i64,
|
|
///
|
|
pub updated_at: i64,
|
|
}
|
|
|
|
///
|
|
#[derive(Insertable, Debug, Clone)]
|
|
#[table_name = "member_bank_withdraws"]
|
|
pub struct NewMemberBankWithdraw {
|
|
///
|
|
pub member_id: uuid::Uuid,
|
|
///
|
|
pub bank_name: String,
|
|
///
|
|
pub name: String,
|
|
///
|
|
pub account_number: String,
|
|
///
|
|
pub amount: f64,
|
|
///
|
|
pub password: String,
|
|
///
|
|
pub memo: Option<String>,
|
|
}
|
|
|
|
///
|
|
#[derive(AsChangeset, Debug, Clone)]
|
|
#[table_name = "member_bank_withdraws"]
|
|
pub struct ModifyMemberBankWithdraw {
|
|
///
|
|
pub bank_name: String,
|
|
///
|
|
pub name: String,
|
|
///
|
|
pub account_number: String,
|
|
///
|
|
pub amount: f64,
|
|
///
|
|
pub password: String,
|
|
///
|
|
pub memo: Option<String>,
|
|
}
|
|
|
|
///
|
|
#[derive(AsChangeset, Debug, Clone)]
|
|
#[table_name = "member_bank_withdraws"]
|
|
pub struct ModifyMemberBankWithdrawForState {
|
|
///
|
|
pub state: MemberBankWithdrawState,
|
|
}
|
|
|
|
///
|
|
#[derive(Debug, Clone)]
|
|
pub struct FindAllSearch {
|
|
///
|
|
pub member_id: Option<uuid::Uuid>,
|
|
///
|
|
pub bank_name_like: Option<String>,
|
|
///
|
|
pub name_like: Option<String>,
|
|
///
|
|
pub account_number_like: Option<String>,
|
|
///
|
|
pub amount: Option<f64>,
|
|
///
|
|
pub memo_like: Option<String>,
|
|
///
|
|
pub state: Option<MemberBankWithdrawState>,
|
|
}
|
|
|
|
///
|
|
#[derive(Debug, Clone)]
|
|
pub struct FindAll {
|
|
///
|
|
pub search: Option<FindAllSearch>,
|
|
///
|
|
pub pagination: Option<bcr::pagination::Pagination>,
|
|
///
|
|
pub sorts: Option<Vec<bcr::pagination::Sort>>,
|
|
}
|