32 lines
636 B
PHP
32 lines
636 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class GoogleDriveConnection extends Model
|
|
{
|
|
protected $fillable = [
|
|
'user_id',
|
|
'access_token',
|
|
'refresh_token',
|
|
'token_expires_at',
|
|
'account_email',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'token_expires_at' => 'datetime',
|
|
'access_token' => 'encrypted',
|
|
'refresh_token' => 'encrypted',
|
|
];
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|