var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { column } from '@adonisjs/lucid/orm';
import { VineModel } from '@akago/vine-lucid';
import vine from '@vinejs/vine';
import { belongsToWithIdColumn } from '../../lib/belong_to_with_id_column.js';
import { AKAuditableModel } from '../crud/model.js';
export var AKDeviceTokenType;
(function (AKDeviceTokenType) {
    AKDeviceTokenType["web"] = "web";
})(AKDeviceTokenType || (AKDeviceTokenType = {}));
export const deviceToken = (userModel) => {
    class DeviceToken extends AKAuditableModel {
    }
    __decorate([
        VineModel(() => vine.lucid(userModel, { partial: true, null: true }), () => userModel),
        belongsToWithIdColumn(() => userModel, { serializeAs: null }, { serializeAs: null }),
        __metadata("design:type", Object)
    ], DeviceToken.prototype, "user", void 0);
    __decorate([
        VineModel(vine.enumWithValues(AKDeviceTokenType)),
        column(),
        __metadata("design:type", String)
    ], DeviceToken.prototype, "type", void 0);
    __decorate([
        VineModel(vine.string()),
        column(),
        __metadata("design:type", String)
    ], DeviceToken.prototype, "token", void 0);
    return DeviceToken;
};
//# sourceMappingURL=device_token.js.map