X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/04f37e21e2d1552ed537b35faba37ec53971a5bc..refs/pull/3593/head:/app/Actions/Webhook.php diff --git a/app/Actions/Webhook.php b/app/Actions/Webhook.php index 2c0bd0f15..72a67ad92 100644 --- a/app/Actions/Webhook.php +++ b/app/Actions/Webhook.php @@ -3,6 +3,7 @@ namespace BookStack\Actions; use BookStack\Interfaces\Loggable; +use Carbon\Carbon; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; @@ -14,13 +15,22 @@ use Illuminate\Database\Eloquent\Relations\HasMany; * @property string $endpoint * @property Collection $trackedEvents * @property bool $active + * @property int $timeout + * @property string $last_error + * @property Carbon $last_called_at + * @property Carbon $last_errored_at */ class Webhook extends Model implements Loggable { - protected $fillable = ['name', 'endpoint']; + protected $fillable = ['name', 'endpoint', 'timeout']; use HasFactory; + protected $casts = [ + 'last_called_at' => 'datetime', + 'last_errored_at' => 'datetime', + ]; + /** * Define the tracked event relation a webhook. */