33 lines
635 B
PHP
33 lines
635 B
PHP
<?php
|
|
|
|
namespace App\Models\Auth;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class DingTalkIdentity extends Model
|
|
{
|
|
protected $table = 'dingtalk_identities';
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'union_id',
|
|
'open_id',
|
|
'dingtalk_user_id',
|
|
'nickname',
|
|
'bound_by',
|
|
'bound_at',
|
|
'last_logged_in_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'bound_at' => 'datetime',
|
|
'last_logged_in_at' => 'datetime',
|
|
];
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|