migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Accounting\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Transaction extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'restaurant_id',
|
||||
'fund_id',
|
||||
'transaction_type',
|
||||
'transaction_date',
|
||||
'reference_no',
|
||||
'notes',
|
||||
'total_debit',
|
||||
'total_credit',
|
||||
'created_by',
|
||||
];
|
||||
|
||||
protected $dates = ['transaction_date'];
|
||||
|
||||
public const TABLE_NAME = 'transactions';
|
||||
|
||||
protected $table = self::TABLE_NAME;
|
||||
|
||||
public function details(): HasMany
|
||||
{
|
||||
return $this->hasMany(TransactionDetail::class);
|
||||
}
|
||||
|
||||
public function fund(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Fund::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user