ruwebframe 0.1.2

a simple webframe for rust actix-web, based on rudi and rbatis.
Documentation

use crate::rubase::rudto::cfgdto::{dbdto, redisdto, softdto, webdto};
use crate::rubase::ruentity;
use serde::{Deserialize, Serialize};
use std::fmt::Display;

#[derive(Debug, Clone, Default, Deserialize, Serialize)]
pub struct CfgDto {

    pub software: softdto::SoftDto,
    pub web: webdto::WebDto,
    pub gorm: dbdto::Gorm,
    pub datasource: dbdto::DataSource,
    pub redis: redisdto::RedisDto,

}
//impl_base_entity_single!(ConfigDto);
impl ruentity::BaseEntity for CfgDto {}

impl CfgDto {
    pub fn new() -> CfgDto {
        Self {
            redis: redisdto::RedisDto::default(),
            software: softdto::SoftDto::default(),
            gorm: dbdto::Gorm::new(),
            datasource: dbdto::DataSource::new(),
            web: webdto::WebDto::new(),
        }
    }
    pub fn parse_env_var(&mut self) {
        self.software.parse_env_var();
        self.web.parse_env_var();
        self.gorm.parse_env_var();
        self.datasource.parse_env_var();
        self.redis.parse_env_var();

    }
}