updated models
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Change proposal
|
||||
*/
|
||||
class Proposal extends Model
|
||||
{
|
||||
/** Added rows */
|
||||
public function addedRows()
|
||||
{
|
||||
return $this->belongsToMany(Row::class, 'proposal_add_row_pivot');
|
||||
}
|
||||
|
||||
/** Removed rows */
|
||||
public function removedRows()
|
||||
{
|
||||
return $this->belongsToMany(Row::class, 'proposal_remove_row_pivot');
|
||||
}
|
||||
|
||||
/** Authoring user */
|
||||
public function author()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'author_id');
|
||||
}
|
||||
|
||||
/** Target revision */
|
||||
public function revision()
|
||||
{
|
||||
return $this->belongsTo(Revision::class);
|
||||
}
|
||||
|
||||
/** Target table (that this was submitted to) */
|
||||
public function table()
|
||||
{
|
||||
return $this->belongsTo(Table::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user