import { IAPIObject } from "./IAPIObject";

class APIToken extends IAPIObject {
    
    static storage_key = 'pairent_api_key';

    constructor(data) {
        super();
        this.user       = data.user;
        this.key        = data.key;
        this.expires    = data.expires;
        this.ip         = data.ip;
    }

    /** @type {number} */
    user;

    /** @type {string} */
    key;

    /** A Unix timestamp (when the token will expire)
     * @type {number}
     */
    expires;

    /** @type {string} */
    ip;
}

export { APIToken };