Add new tables, add automatic data cleanup with configurable duration, move company business logic into seperate folder

This commit is contained in:
2026-09-07 16:41:26 +03:00
parent ac6f935239
commit 666ef42688
16 changed files with 537 additions and 254 deletions

18
src/db/models/wara.rs Normal file
View File

@@ -0,0 +1,18 @@
#![allow(dead_code)]
use chrono::NaiveDateTime;
use diesel::prelude::*;
#[derive(Debug, Queryable, Selectable)]
#[diesel(table_name = crate::db::schema::wara)]
#[diesel(check_for_backend(crate::db::DbBackend))]
pub struct Wara {
pub id: i64,
pub last_client_reading_cleanup: Option<NaiveDateTime>,
}
#[derive(Debug, Insertable)]
#[diesel(table_name = crate::db::schema::wara)]
pub struct NewWara {
pub last_client_reading_cleanup: Option<NaiveDateTime>,
}