wasmcloud/src/models.rs

24 lines
523 B
Rust
Raw Normal View History

2020-10-26 16:56:24 +00:00
use serde::Serialize;
use uuid::Uuid;
2020-10-27 16:21:28 +00:00
use crate::schema::{gitea_tokens, users};
2020-10-26 16:56:24 +00:00
#[derive(Insertable, Queryable, Serialize, Debug, Clone)]
#[table_name="users"]
pub struct User {
2020-10-27 16:21:28 +00:00
pub id: Uuid,
pub email: String,
pub salutation: String,
pub is_admin: bool,
pub is_locked: bool,
pub tier: i32,
}
#[derive(Insertable, Queryable, Debug, Clone)]
#[table_name="gitea_tokens"]
pub struct GiteaToken {
pub id: Uuid,
pub user_id: Uuid,
pub access_token: String,
pub refresh_token: String,
2020-10-26 16:56:24 +00:00
}