use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "offer_metadata_table")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub partition: String,
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub metadata: Json,
pub created_at: DateTimeWithTimeZone,
pub updated_at: DateTimeWithTimeZone,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::offer_record_table::Entity")]
OfferRecordTable,
}
impl Related<super::offer_record_table::Entity> for Entity {
fn to() -> RelationDef {
Relation::OfferRecordTable.def()
}
}
impl ActiveModelBehavior for ActiveModel {}