import { OauthConfig } from "./OauthConfig";
import { CasConfig } from "./CasConfig";
import { WxQyOauth } from "./WxQyOauth";

export class CoreConfig {
  sysId: string;
  baseApi: string;
  authPreferTo: string;
  oauth: OauthConfig;
  cas: CasConfig;
  wxQyOauth: WxQyOauth;
  constructor(
    options: {
      sysId?: string;
      baseApi?: string;
      authPreferTo?: string;
      oauth?: OauthConfig;
      cas?: CasConfig;
      wxQyOauth?: WxQyOauth;
    } = {}
  ) {
    this.sysId = options.sysId || "";
    this.baseApi = options.baseApi || "";
    this.authPreferTo = options.authPreferTo || "";
    this.oauth = options.oauth || new OauthConfig();
    this.cas = options.cas || new CasConfig();
    this.wxQyOauth = options.wxQyOauth || new WxQyOauth();
  }
}
