<?php

namespace Hubleto\App\Community\Auth\Models;

use Hubleto\Erp\Model;

use Hubleto\App\Community\Auth\Models\User;

class UserHasToken extends Model {

  public string $table = "user_has_tokens";
  public string $recordManagerClass = RecordManagers\UserHasToken::class;
  public bool $isJunctionTable = false;

  public bool $disableAuditLog = true;

  public function describeColumns(): array
  {
    return array_merge(parent::describeColumns(), [
      'id_user' => new \Hubleto\Framework\Db\Column\Lookup($this, 'User', User::class),
      'id_token' => new \Hubleto\Framework\Db\Column\Lookup($this, 'Token', Token::class),
    ]);
  }
}
