summaryrefslogtreecommitdiff
path: root/src/Models/Tokens.php
blob: a94c8760c3efd12f06971c84325cb21c48355d16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php

namespace App\Models;

use App\Support\ConnectsToDatabase;

class Tokens implements ConnectsToDatabase
{
  public function __construct(
    private string $accessToken,
    private string $refreshToken,
    private string $userId,
    private string $deviceId = "",
  )
  {}

  public static function fromDatabase(array $row): self
  {
    return new self(
      $row["access_token"],
      $row["refresh_token"],
      $row["user_id"],
      $row["device_id"],
    );
  }

  public static function fetch(): ?self
  {}

  public static function fetchAll(): array
  {}

  public function insert(): bool
  {}

  public function update(): bool
  {}

  public function delete(): bool
  {}
}