photon_indexer/dao/generated/
blocks.rs

1//! `SeaORM` Entity. Generated by sea-orm-codegen 0.10.6
2
3use sea_orm::entity::prelude::*;
4
5#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
6#[sea_orm(table_name = "blocks")]
7pub struct Model {
8    #[sea_orm(primary_key, auto_increment = false)]
9    pub slot: i64,
10    pub parent_slot: i64,
11    pub parent_blockhash: Vec<u8>,
12    pub blockhash: Vec<u8>,
13    pub block_height: i64,
14    pub block_time: i64,
15}
16
17#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
18pub enum Relation {
19    #[sea_orm(has_many = "super::transactions::Entity")]
20    Transactions,
21}
22
23impl Related<super::transactions::Entity> for Entity {
24    fn to() -> RelationDef {
25        Relation::Transactions.def()
26    }
27}
28
29impl ActiveModelBehavior for ActiveModel {}