|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Lackoxygen\TiktokShop\Supervisor\Session;
|
|
|
|
|
|
|
|
use Carbon\Carbon;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
|
|
|
class Store
|
|
|
|
{
|
|
|
|
use SerializesModels;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The ID.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected string $id;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The access token.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected string $accessToken;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The refresh token.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected string $refreshToken;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The created at.
|
|
|
|
*
|
|
|
|
* @var Carbon
|
|
|
|
*/
|
|
|
|
protected Carbon $createdAt;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The expired at.
|
|
|
|
*
|
|
|
|
* @var Carbon
|
|
|
|
*/
|
|
|
|
protected Carbon $expiredAt;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The expires in.
|
|
|
|
*
|
|
|
|
* @var int
|
|
|
|
*/
|
|
|
|
protected int $expiresIn;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* the more data.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected array $extras = [];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* the refresh num.
|
|
|
|
*
|
|
|
|
* @var int
|
|
|
|
*/
|
|
|
|
protected int $refreshNum = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getId(): string
|
|
|
|
{
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $id
|
|
|
|
*/
|
|
|
|
public function setId(string $id): void
|
|
|
|
{
|
|
|
|
$this->id = $id;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getAccessToken(): string
|
|
|
|
{
|
|
|
|
return $this->accessToken;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $accessToken
|
|
|
|
*/
|
|
|
|
public function setAccessToken(string $accessToken): void
|
|
|
|
{
|
|
|
|
$this->accessToken = $accessToken;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getRefreshToken(): string
|
|
|
|
{
|
|
|
|
return $this->refreshToken;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $refreshToken
|
|
|
|
*/
|
|
|
|
public function setRefreshToken(string $refreshToken): void
|
|
|
|
{
|
|
|
|
$this->refreshToken = $refreshToken;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Carbon
|
|
|
|
*/
|
|
|
|
public function getCreatedAt(): Carbon
|
|
|
|
{
|
|
|
|
return $this->createdAt;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Carbon $createdAt
|
|
|
|
*/
|
|
|
|
public function setCreatedAt(Carbon $createdAt): void
|
|
|
|
{
|
|
|
|
$this->createdAt = $createdAt;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Carbon
|
|
|
|
*/
|
|
|
|
public function getExpiredAt(): Carbon
|
|
|
|
{
|
|
|
|
return $this->expiredAt;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Carbon $expiredAt
|
|
|
|
*/
|
|
|
|
public function setExpiredAt(Carbon $expiredAt): void
|
|
|
|
{
|
|
|
|
$this->expiredAt = $expiredAt;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getExpiresIn(): int
|
|
|
|
{
|
|
|
|
return $this->expiresIn;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param int $expiresIn
|
|
|
|
*/
|
|
|
|
public function setExpiresIn(int $expiresIn): void
|
|
|
|
{
|
|
|
|
$this->expiresIn = $expiresIn;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getExtras(): array
|
|
|
|
{
|
|
|
|
return $this->extras;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param array $extras
|
|
|
|
*/
|
|
|
|
public function setExtras(array $extras): void
|
|
|
|
{
|
|
|
|
$this->extras = $extras;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getRefreshNum(): int
|
|
|
|
{
|
|
|
|
return $this->refreshNum;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param int $refreshNum
|
|
|
|
*/
|
|
|
|
public function setRefreshNum(int $refreshNum): void
|
|
|
|
{
|
|
|
|
$this->refreshNum = $refreshNum;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|