use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use toolkit_db_macros::Scopable;
use uuid::Uuid;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Scopable)]
#[sea_orm(table_name = "ingest_idempotency")]
#[secure(tenant_col = "tenant_id", no_resource, no_owner, no_type)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub tenant_id: Uuid,
#[sea_orm(primary_key, auto_increment = false)]
pub producer: String,
#[sea_orm(primary_key, auto_increment = false)]
pub idempotency_key: String,
pub request_hash: String,
pub source_epoch: i64,
pub graph_revision: i64,
pub response: Json,
pub created_at: OffsetDateTime,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}