hopr_db_entity/codegen/sqlite/
announcement.rs

1//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.10
2
3use sea_orm::entity::prelude::*;
4
5#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
6#[sea_orm(table_name = "announcement")]
7pub struct Model {
8    #[sea_orm(primary_key)]
9    pub id: i32,
10    pub account_id: i32,
11    pub multiaddress: String,
12    pub at_block: i32,
13}
14
15#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
16pub enum Relation {
17    #[sea_orm(
18        belongs_to = "super::account::Entity",
19        from = "Column::AccountId",
20        to = "super::account::Column::Id",
21        on_update = "Restrict",
22        on_delete = "Cascade"
23    )]
24    Account,
25}
26
27impl Related<super::account::Entity> for Entity {
28    fn to() -> RelationDef {
29        Relation::Account.def()
30    }
31}
32
33impl ActiveModelBehavior for ActiveModel {}