add doc comments to models

This commit is contained in:
2018-07-14 18:50:25 +02:00
parent f12773ccd1
commit 25cb60d377
8 changed files with 78 additions and 62 deletions
+14 -1
View File
@@ -3,10 +3,23 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Riesjart\Relaquent\Model\Concerns\HasRelaquentRelationships;
/**
* Table revision (a set of rows)
*
* @property int $id
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @property int $refs
* @property int $ancestor_id
* @property string $note
* @property string $index_column
* @property Revision|null $parentRevision
* @property Row[]|Collection $rows
* @property Proposal|null $sourceProposal - proposal that was used to create this revision
* @property Proposal[]|Collection $dependentProposals
*/
class Revision extends Model
{
@@ -29,7 +42,7 @@ class Revision extends Model
}
/** Proposal that lead to this revision */
public function appliedProposal()
public function sourceProposal()
{
return $this->hasOneThrough(Proposal::class, 'revision_proposal_pivot');
}