a / api /src /entity /id_cache_snapshot.rs
FTA7700
Add cache restart-persistence and 7-day cleanup job
1ad3b12
Raw History Blame Contribute Delete
460 Bytes
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "id_cache_snapshot")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false, column_type = "Text")]
pub key: String,
#[sea_orm(column_type = "Text")]
pub value: String,
pub expires_at: i64,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}