Skip to main content

systemprompt_database/repository/service/
model.rs

1//! Data models for the [`super::ServiceRepository`].
2
3use serde::{Deserialize, Serialize};
4use sqlx::FromRow;
5
6#[derive(Debug, Clone, FromRow, Serialize, Deserialize)]
7pub struct ServiceConfig {
8    pub name: String,
9    pub module_name: String,
10    pub status: String,
11    pub pid: Option<i32>,
12    pub port: i32,
13    pub binary_mtime: Option<i64>,
14    pub created_at: String,
15    pub updated_at: String,
16}
17
18#[derive(Debug)]
19pub struct CreateServiceInput<'a> {
20    pub name: &'a str,
21    pub module_name: &'a str,
22    pub status: &'a str,
23    pub port: u16,
24    pub binary_mtime: Option<i64>,
25}