2022-10-25 06:41:59 +03:00
|
|
|
//! SeaORM Entity. Generated by sea-orm-codegen 0.10.0
|
2022-09-24 03:14:35 +03:00
|
|
|
|
|
|
|
use super::sea_orm_active_enums::Method;
|
|
|
|
use sea_orm::entity::prelude::*;
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
2022-10-25 06:41:59 +03:00
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
|
2022-09-24 03:14:35 +03:00
|
|
|
#[sea_orm(table_name = "revert_logs")]
|
|
|
|
pub struct Model {
|
|
|
|
#[sea_orm(primary_key)]
|
|
|
|
pub id: u64,
|
|
|
|
pub user_key_id: u64,
|
|
|
|
pub timestamp: DateTimeUtc,
|
|
|
|
pub method: Method,
|
|
|
|
pub to: Vec<u8>,
|
2022-09-24 10:03:29 +03:00
|
|
|
#[sea_orm(column_type = "Text", nullable)]
|
|
|
|
pub call_data: Option<String>,
|
2022-10-26 00:10:05 +03:00
|
|
|
pub chain_id: u64,
|
2022-09-24 03:14:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
|
|
pub enum Relation {
|
|
|
|
#[sea_orm(
|
|
|
|
belongs_to = "super::user_keys::Entity",
|
|
|
|
from = "Column::UserKeyId",
|
|
|
|
to = "super::user_keys::Column::Id",
|
|
|
|
on_update = "NoAction",
|
|
|
|
on_delete = "NoAction"
|
|
|
|
)]
|
|
|
|
UserKeys,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Related<super::user_keys::Entity> for Entity {
|
|
|
|
fn to() -> RelationDef {
|
|
|
|
Relation::UserKeys.def()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|