a083bc652d
* add more columns to handle uncled transactions * handle payment uncles * put relations back * include all the new columns * lower log levels * improve block caching if we have a block with a number, its canonical. uncles don't get returned * improve disconnect logic * lint * clear first changed for new_top_config_receiver * better logs around config changing * i guess we do want one apply top_config at the start * check correct variable for data limits
71 lines
1.8 KiB
Rust
71 lines
1.8 KiB
Rust
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.10.7
|
|
|
|
use crate::serialization;
|
|
use sea_orm::entity::prelude::*;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
|
|
#[sea_orm(table_name = "user")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: u64,
|
|
#[sea_orm(unique)]
|
|
#[serde(serialize_with = "serialization::vec_as_address")]
|
|
pub address: Vec<u8>,
|
|
pub description: Option<String>,
|
|
pub email: Option<String>,
|
|
pub user_tier_id: u64,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {
|
|
#[sea_orm(has_many = "super::login::Entity")]
|
|
Login,
|
|
#[sea_orm(has_many = "super::rpc_key::Entity")]
|
|
RpcKey,
|
|
#[sea_orm(has_many = "super::increase_on_chain_balance_receipt::Entity")]
|
|
IncreaseOnChainBalanceReceipt,
|
|
#[sea_orm(has_many = "super::secondary_user::Entity")]
|
|
SecondaryUser,
|
|
#[sea_orm(
|
|
belongs_to = "super::user_tier::Entity",
|
|
from = "Column::UserTierId",
|
|
to = "super::user_tier::Column::Id",
|
|
on_update = "NoAction",
|
|
on_delete = "NoAction"
|
|
)]
|
|
UserTier,
|
|
}
|
|
|
|
impl Related<super::login::Entity> for Entity {
|
|
fn to() -> RelationDef {
|
|
Relation::Login.def()
|
|
}
|
|
}
|
|
|
|
impl Related<super::rpc_key::Entity> for Entity {
|
|
fn to() -> RelationDef {
|
|
Relation::RpcKey.def()
|
|
}
|
|
}
|
|
|
|
impl Related<super::increase_on_chain_balance_receipt::Entity> for Entity {
|
|
fn to() -> RelationDef {
|
|
Relation::IncreaseOnChainBalanceReceipt.def()
|
|
}
|
|
}
|
|
|
|
impl Related<super::secondary_user::Entity> for Entity {
|
|
fn to() -> RelationDef {
|
|
Relation::SecondaryUser.def()
|
|
}
|
|
}
|
|
|
|
impl Related<super::user_tier::Entity> for Entity {
|
|
fn to() -> RelationDef {
|
|
Relation::UserTier.def()
|
|
}
|
|
}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|