mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
85 lines
1.9 KiB
TypeScript
85 lines
1.9 KiB
TypeScript
export class BaseSettings {
|
|
static __key__: string;
|
|
static __title__: string;
|
|
static __access__ = 'private';
|
|
|
|
static getCacheKey() {
|
|
return 'settings.' + this.__key__;
|
|
}
|
|
}
|
|
|
|
export class SysPublicSettings extends BaseSettings {
|
|
static __key__ = 'sys.public';
|
|
static __title__ = '系统公共设置';
|
|
static __access__ = 'public';
|
|
registerEnabled = false;
|
|
managerOtherUserPipeline = false;
|
|
icpNo?: string;
|
|
// triggerOnStartup = false;
|
|
}
|
|
|
|
export class SysPrivateSettings extends BaseSettings {
|
|
static __title__ = '系统私有设置';
|
|
static __access__ = 'private';
|
|
static __key__ = 'sys.private';
|
|
jwtKey?: string;
|
|
encryptSecret?: string;
|
|
}
|
|
|
|
export class SysInstallInfo extends BaseSettings {
|
|
static __title__ = '系统安装信息';
|
|
static __key__ = 'sys.install';
|
|
static __access__ = 'private';
|
|
installTime: number;
|
|
siteId?: string;
|
|
bindUserId?: number;
|
|
bindUrl?: string;
|
|
accountServerBaseUrl?: string;
|
|
appKey?: string;
|
|
}
|
|
|
|
export class SysLicenseInfo extends BaseSettings {
|
|
static __title__ = '授权许可信息';
|
|
static __key__ = 'sys.license';
|
|
static __access__ = 'private';
|
|
license?: string;
|
|
}
|
|
|
|
export class SysEmailConf extends BaseSettings {
|
|
static __title__ = '邮箱配置';
|
|
static __key__ = 'sys.email';
|
|
static __access__ = 'private';
|
|
|
|
host: string;
|
|
port: number;
|
|
auth: {
|
|
user: string;
|
|
pass: string;
|
|
};
|
|
secure: boolean; // use TLS
|
|
tls: {
|
|
// do not fail on invalid certs
|
|
rejectUnauthorized: boolean;
|
|
};
|
|
sender: string;
|
|
usePlus?: boolean;
|
|
}
|
|
|
|
export class SysSiteInfo extends BaseSettings {
|
|
static __title__ = '站点信息';
|
|
static __key__ = 'sys.site';
|
|
static __access__ = 'public';
|
|
title?: string;
|
|
slogan?: string;
|
|
logo?: string;
|
|
loginLogo?: string;
|
|
}
|
|
|
|
export class SysSiteEnv {
|
|
agent?: {
|
|
enabled?: boolean;
|
|
contactText?: string;
|
|
contactLink?: string;
|
|
};
|
|
}
|