hyperion/db/
models.rs

1use sqlx::FromRow;
2
3#[derive(Debug, Clone, PartialEq, FromRow)]
4pub struct DbUser {
5    pub user: String,
6    pub password: Vec<u8>,
7    pub token: Vec<u8>,
8    pub salt: Vec<u8>,
9    pub comment: Option<String>,
10    pub id: Option<String>,
11    pub created_at: String,
12    pub last_use: String,
13}
14
15#[derive(Debug, Clone, PartialEq, FromRow)]
16pub struct DbInstance {
17    pub instance: i32,
18    pub friendly_name: String,
19    pub enabled: i32,
20    pub last_use: String,
21}
22
23#[derive(Debug, Clone, PartialEq, FromRow)]
24pub struct DbMeta {
25    pub uuid: String,
26    pub created_at: String,
27}
28
29#[derive(Debug, Clone, PartialEq, FromRow)]
30pub struct DbSetting {
31    #[sqlx(rename = "type")]
32    pub ty: String,
33    pub config: String,
34    pub hyperion_inst: Option<i32>,
35    pub updated_at: String,
36}