Add basic models

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet
2025-08-20 14:04:08 +02:00
parent b769fa63f7
commit acf875ed33
10 changed files with 225 additions and 0 deletions

17
src/models/context.rs Normal file
View File

@@ -0,0 +1,17 @@
use serde::{Deserialize, Serialize};
use crate::time::Timestamp;
#[derive(Serialize, Deserialize)]
pub struct Context {
/// Redis DB to use
id: u32,
/// Actor ids which have admin rights on this context
admins: Vec<u32>,
/// Actor ids which can read the context info
readers: Vec<u32>,
/// Actor ids which can execute jobs in this context
executors: Vec<u32>,
created_at: Timestamp,
upddated_at: Timestamp,
}