refactor(router): move db models into separate crate and refactoring around it (#125)

This commit is contained in:
ItsMeShashank
2022-12-13 12:00:27 +05:30
committed by GitHub
parent fc670ea0da
commit eb4fe6f46b
106 changed files with 4013 additions and 3387 deletions

View File

@ -0,0 +1,34 @@
use diesel::{Identifiable, Insertable, Queryable};
use crate::schema::locker_mock_up;
#[derive(Clone, Debug, Eq, Identifiable, Queryable, PartialEq)]
#[diesel(table_name = locker_mock_up)]
pub struct LockerMockUp {
pub id: i32,
pub card_id: String,
pub external_id: String,
pub card_fingerprint: String,
pub card_global_fingerprint: String,
pub merchant_id: String,
pub card_number: String,
pub card_exp_year: String,
pub card_exp_month: String,
pub name_on_card: Option<String>,
pub nickname: Option<String>,
pub customer_id: Option<String>,
pub duplicate: Option<bool>,
}
#[derive(Clone, Debug, Default, Insertable, router_derive::DebugAsDisplay)]
#[diesel(table_name = locker_mock_up)]
pub struct LockerMockUpNew {
pub card_id: String,
pub external_id: String,
pub card_fingerprint: String,
pub card_global_fingerprint: String,
pub merchant_id: String,
pub card_number: String,
pub card_exp_year: String,
pub card_exp_month: String,
}