feat: tambah budget kegiatan dengan alur threshold approval/voting
This commit is contained in:
@@ -4,11 +4,12 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use App\Models\Activity;
|
||||
|
||||
class CashRecord extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'amount', 'category_id', 'description',
|
||||
'amount', 'category_id', 'activity_id', 'description',
|
||||
'date', 'created_by', 'verified_by', 'verified_at',
|
||||
];
|
||||
|
||||
@@ -29,6 +30,11 @@ class CashRecord extends Model
|
||||
return $this->belongsTo(CashCategory::class, 'category_id');
|
||||
}
|
||||
|
||||
public function activity(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Activity::class);
|
||||
}
|
||||
|
||||
public function creator(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by');
|
||||
|
||||
Reference in New Issue
Block a user