feat: add migration for cache table with necessary columns and indexes
This commit is contained in:
24
src-tauri/src/db/entities/cache.rs
Normal file
24
src-tauri/src/db/entities/cache.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)]
|
||||
#[sea_orm(table_name = "cache")]
|
||||
#[allow(dead_code)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub category: String,
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub key: String,
|
||||
pub value: String,
|
||||
pub is_invalidated: bool,
|
||||
pub expire_at: Option<String>,
|
||||
pub created_at: String,
|
||||
pub updated_at: String,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
||||
@@ -4,6 +4,7 @@ pub mod prelude;
|
||||
|
||||
pub mod account;
|
||||
pub mod account_category;
|
||||
pub mod cache;
|
||||
pub mod category;
|
||||
pub mod tag;
|
||||
pub mod transaction;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
pub use super::account::Entity as Account;
|
||||
pub use super::account_category::Entity as AccountCategory;
|
||||
pub use super::cache::Entity as Cache;
|
||||
pub use super::category::Entity as Category;
|
||||
pub use super::tag::Entity as Tag;
|
||||
pub use super::transaction::Entity as Transaction;
|
||||
|
||||
Reference in New Issue
Block a user