import { AbstractSchema } from "./abstract.schema";
export interface User {
  email: string;
  password: string;
  deleted: boolean;
  createdAt: Date;
  updatedAt: Date;
}

export interface RootObject {
  token: string;
  user?: User;
}

class AuthSchema extends AbstractSchema {
  constructor(schemas) {
    super(schemas);
  }
}
const parentSchema: RootObject = {
  token:
    "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MjhmZDkwNTYyNWFmNGVlOTBmZDNlNzkiLCJpYXQiOjE2NTM2NjUzNjcsImV4cCI6MTY1MzY3MjU2N30.e0DdXetMt0BGxhSP7D9ZvydVP26gej6Q_xbNV7x_0xE",
};
const responseSchema: RootObject = {
  token:
    "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MjhmZDkwNTYyNWFmNGVlOTBmZDNlNzkiLCJpYXQiOjE2NTM2NjUzNjcsImV4cCI6MTY1MzY3MjU2N30.e0DdXetMt0BGxhSP7D9ZvydVP26gej6Q_xbNV7x_0xE",
};

export const schema = new AuthSchema({ parentSchema, responseSchema });
