Skip to main content

systemprompt_database/repository/service/
model.rs

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