hopr_db_entity/codegen/sqlite/
log_status.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.4

use sea_orm::entity::prelude::*;

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "log_status")]
pub struct Model {
    #[sea_orm(primary_key, auto_increment = false, column_type = "Binary(8)")]
    pub transaction_index: Vec<u8>,
    #[sea_orm(primary_key, auto_increment = false, column_type = "Binary(8)")]
    pub log_index: Vec<u8>,
    #[sea_orm(primary_key, auto_increment = false, column_type = "Binary(8)")]
    pub block_number: Vec<u8>,
    pub processed: bool,
    pub processed_at: Option<DateTime>,
    #[sea_orm(column_type = "Binary(32)", nullable)]
    pub checksum: Option<Vec<u8>>,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
    #[sea_orm(has_one = "super::log::Entity")]
    Log,
}

impl Related<super::log::Entity> for Entity {
    fn to() -> RelationDef {
        Relation::Log.def()
    }
}

impl ActiveModelBehavior for ActiveModel {}