Add new tables, add automatic data cleanup with configurable duration, move company business logic into seperate folder
This commit is contained in:
18
src/db/models/wara.rs
Normal file
18
src/db/models/wara.rs
Normal 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>,
|
||||
}
|
||||
Reference in New Issue
Block a user