Files
exchange-2.0/app/Models/WorkflowTimestamp.php
T
2024-07-22 01:12:51 +08:00

48 lines
838 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class WorkflowTimestamp extends Model
{
use HasFactory;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'workflow_timestamps';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'node',
'seconds',
'userId',
'session_id'
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'timestamp' => 'datetime',
];
/**
* Get the user that owns the workflow timestamp.
*/
public function user()
{
return $this->belongsTo(User::class, 'userId');
}
}