Files
exchange-2.0/app/Models/WorkflowTimestamp.php
2024-07-23 15:53:53 +08:00

50 lines
883 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 = [
'current_node',
'next_node',
'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');
}
}