use crate::rubase::ruentity;
use crate::rubase::rutils::strutils;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
pub struct WebDto {
pub server: ServerDto,
pub client: ClientDto,
}
impl ruentity::BaseEntity for WebDto {}
impl WebDto {
pub fn new() -> Self {
Self {
server: ServerDto::new(),
client: ClientDto::new(),
}
}
pub fn parse_env_var(&mut self) {
self.server.parse_env_var();
self.client.parse_env_var();
}
}
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
pub struct ServerDto {
pub name: String,
pub port: String,
pub title: String,
pub ver: String,
}
impl ServerDto {
pub fn new() -> Self {
Self {
name: String::new(),
port: String::new(),
title: String::new(),
ver: String::new(),
}
}
pub fn parse_env_var(&mut self) {}
}
impl ruentity::BaseEntity for ServerDto {}
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
pub struct ClientDto {
pub name: String,
pub testUrl: String,
pub enableTestUrl: String,
pub webTimeout: String,
}
impl ClientDto {
pub fn new() -> Self {
Self {
name: String::new(),
testUrl: String::new(),
enableTestUrl: String::new(),
webTimeout: String::new(),
}
}
pub fn parse_env_var(&mut self) {}
}
impl ruentity::BaseEntity for ClientDto {}