export class Token {
  accessToken: string;
  access_token?: string;
  tokenType: string;
  refreshToken: string;
  expiresIn: number | undefined;
  scope: string;
  roles: any[];
  time: number | undefined;
  userName: string;
  jti: string;
  constructor(
    options: {
      access_token?: string;
      accessToken?: string;
      token_type?: string;
      tokenType?: string;
      refresh_token?: string;
      refreshToken?: string;
      expires_in?: number;
      expiresIn?: number;
      scope?: string;
      roles?: any[];
      time?: number;
      userName?: string;
      jti?: string;
    } = {}
  ) {
    this.accessToken = options.access_token || options.accessToken || "";
    this.tokenType = options.token_type || options.tokenType || "";
    this.refreshToken = options.refresh_token || options.refreshToken || "";
    this.expiresIn = options.expires_in || options.expiresIn;
    this.scope = options.scope || "";
    this.roles = options.roles || [];
    this.time = options.time;
    this.userName = options.userName || "";
    this.jti = options.jti || "";
  }
}
