"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Device = void 0;
class Device {
    id;
    location;
    type;
    info;
    ipAddress;
    userAgent;
    fingerprint;
    status;
    pushToken;
    createdAt;
    updatedAt;
    constructor(id, location, type, info, ipAddress, userAgent, fingerprint, status, pushToken, createdAt, updatedAt) {
        this.id = id;
        this.location = location;
        this.type = type;
        this.info = info;
        this.ipAddress = ipAddress;
        this.userAgent = userAgent;
        this.fingerprint = fingerprint;
        this.status = status;
        this.pushToken = pushToken;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }
    static create(id, location, type, info, ipAddress, userAgent, fingerprint, status = 'closed', pushToken = null) {
        const now = new Date();
        return new Device(id, location, type, info, ipAddress, userAgent, fingerprint, status, pushToken, now, now);
    }
    updateStatus(status) {
        return new Device(this.id, this.location, this.type, this.info, this.ipAddress, this.userAgent, this.fingerprint, status, this.pushToken, this.createdAt, new Date());
    }
    updatePushToken(pushToken) {
        return new Device(this.id, this.location, this.type, this.info, this.ipAddress, this.userAgent, this.fingerprint, this.status, pushToken, this.createdAt, new Date());
    }
}
exports.Device = Device;
//# sourceMappingURL=device.js.map