'int', 'bytes' => 'int', ]; /** * @var array */ protected $dates = [ 'completed_at', ]; /** * @var array */ protected $attributes = [ 'sha256_hash' => null, 'bytes' => 0, ]; /** * @var array */ public static $validationRules = [ 'server_id' => 'bail|required|numeric|exists:servers,id', 'uuid' => 'required|uuid', 'name' => 'required|string|regex:/^[w\][\w\s_.-]*[\w]$/', 'ignored_files' => 'string', 'disk' => 'required|string', 'sha256_hash' => 'nullable|string', 'bytes' => 'numeric', ]; /** * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function server() { return $this->belongsTo(Server::class); } }