ruwebframe 0.1.8

a simple webframe for rust actix-web, based on rudi and rbatis.
Documentation
use displaydoc::Display; 
use serde::{Deserialize, Serialize}; 
use crate::rubase::rutils::str_utils;
use crate::rubase::{BaseEntity};

 
#[derive(Debug, Clone,Default, Deserialize, Serialize)]
pub struct Gorm {
    pub debug: String,
    pub dbType: String,
    pub enable: String,    // {DB_ENABLE: true}
    pub maxIdletime: i32,  //900 # s
    pub maxLifetime: i32,  //7200 # s
    pub maxOpenConns: i32, //150
    pub maxIdleConns: i32, //50
}
impl BaseEntity for Gorm {
     
}
impl Gorm {
    pub fn new() -> Gorm {
        Self {
            debug: "false".to_string(),
            dbType: "mysql".to_string(),
            enable: "true".to_string(),
            maxIdletime: 900,
            maxLifetime: 7200,
            maxOpenConns: 150,
            maxIdleConns: 50,
        }
    }
    pub fn parse_env_var(&mut self)   {
        self.debug= str_utils::parse_env_var(std::mem::take(&mut self.debug));
        self.dbType= str_utils::parse_env_var(std::mem::take(&mut self.dbType));
        self.enable= str_utils::parse_env_var(std::mem::take(&mut self.enable));


    }
}