hopr_db_entity/codegen/sqlite/
log_status.rs1use sea_orm::entity::prelude::*;
4
5#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
6#[sea_orm(table_name = "log_status")]
7pub struct Model {
8 #[sea_orm(primary_key, auto_increment = false, column_type = "Binary(8)")]
9 pub transaction_index: Vec<u8>,
10 #[sea_orm(primary_key, auto_increment = false, column_type = "Binary(8)")]
11 pub log_index: Vec<u8>,
12 #[sea_orm(primary_key, auto_increment = false, column_type = "Binary(8)")]
13 pub block_number: Vec<u8>,
14 pub processed: bool,
15 pub processed_at: Option<DateTime>,
16 #[sea_orm(column_type = "Binary(32)", nullable)]
17 pub checksum: Option<Vec<u8>>,
18}
19
20#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
21pub enum Relation {
22 #[sea_orm(has_one = "super::log::Entity")]
23 Log,
24}
25
26impl Related<super::log::Entity> for Entity {
27 fn to() -> RelationDef {
28 Relation::Log.def()
29 }
30}
31
32impl ActiveModelBehavior for ActiveModel {}