hopr_db_entity/codegen/sqlite/
announcement.rsuse sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "announcement")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub account_id: i32,
pub multiaddress: String,
pub at_block: i32,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(
belongs_to = "super::account::Entity",
from = "Column::AccountId",
to = "super::account::Column::Id",
on_update = "Restrict",
on_delete = "Cascade"
)]
Account,
}
impl Related<super::account::Entity> for Entity {
fn to() -> RelationDef {
Relation::Account.def()
}
}
impl ActiveModelBehavior for ActiveModel {}