systemprompt_database/repository/service/
model.rs1use serde::{Deserialize, Serialize};
7use sqlx::FromRow;
8use systemprompt_identifiers::InstanceId;
9
10#[derive(Debug, Clone, FromRow, Serialize, Deserialize)]
11pub struct ServiceConfig {
12 pub instance_id: InstanceId,
13 pub name: String,
14 pub module_name: String,
15 pub status: String,
16 pub pid: Option<i32>,
17 pub port: i32,
18 pub binary_mtime: Option<i64>,
19 pub heartbeat_at: String,
20 pub created_at: String,
21 pub updated_at: String,
22}
23
24#[derive(Debug)]
25pub struct CreateServiceInput<'a> {
26 pub name: &'a str,
27 pub module_name: &'a str,
28 pub status: &'a str,
29 pub port: u16,
30 pub binary_mtime: Option<i64>,
31}