You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
555 B

<?php
namespace App;
use App\HiLib\Models\RemoteModel;
class Task extends RemoteModel
{
public string $host;
public ?string $path;
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
$this->host = 'hi-task-app';
$this->path = 'task/v1/businesses/'.request('_business_info')['id'].'/tasks/';
}
public function files()
{
return $this->hasMany(File::class, 'attached_to_id', 'id')
->where('attached_to_table', enum('tables.tasks.id'));
}
}