server from db working
This commit is contained in:
@ -6,9 +6,10 @@ use serde::Deserialize;
|
||||
|
||||
use crate::status::ServerStatus;
|
||||
|
||||
use crate::schema;
|
||||
|
||||
#[derive(Queryable, Selectable, Debug)]
|
||||
#[diesel(table_name = dockermcmgr::schema::servers)]
|
||||
#[diesel(table_name = schema::servers)]
|
||||
#[diesel(check_for_backend(diesel::pg::Pg))]
|
||||
pub struct Servers {
|
||||
pub id: i64,
|
||||
@ -17,17 +18,17 @@ pub struct Servers {
|
||||
pub last_login: Option<SystemTime>,
|
||||
pub container_id: Option<String>,
|
||||
pub status: ServerStatus,
|
||||
pub redirect_ip: Option<i32>
|
||||
pub redirect_ip: Option<String>
|
||||
}
|
||||
|
||||
|
||||
#[derive(Deserialize, Insertable)]
|
||||
#[diesel(table_name = dockermcmgr::schema::servers)]
|
||||
#[diesel(table_name = schema::servers)]
|
||||
pub struct CreateServer<'a> {
|
||||
pub name: &'a str,
|
||||
pub volume_path: &'a str,
|
||||
pub last_login: Option<SystemTime>,
|
||||
pub container_id: Option<&'a str>,
|
||||
pub status: ServerStatus,
|
||||
pub redirect_ip: Option<i32>
|
||||
pub redirect_ip: Option<&'a str>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user