""" 
环境变量配置文件 env.py 
切换环境，修改文档后面的命令 env = ...

"""

from pydantic import BaseSettings


class Env(BaseSettings):
    DEBUG: bool = False
    TESTING: bool = False
    DATABASE_URI: str = 'sqlite://:memory:'
    DATABASE_USER: str = ''
    DATABASE_PWD: str = ''


class DevelopmentEnv(Env):
    '''
    开发环境配置
    '''
    DEBUG: bool = True

class TestingEnv(Env):
    '''
    测试环境配置
    '''
    TESTING: bool = True

class PrehubEnv(Env):
    '''
    预发布环境配置
    '''
    DATABASE_URI: str = 'mysql://user@localhost/foo'


class ProdEnv(Env):
    '''
    生产环境配置
    '''
    DATABASE_URI: str = 'mysql://user@localhost/foo'
    DATABASE_USER: str = ''
    DATABASE_PWD: str = ''


env = DevelopmentEnv()  # 开发环境
# env = TestingEnv()      # 测试环境
# env = PrehubEnv()       # 预发布环境
# env = ProdEnv()         # 生产环境





