Refactor VisaMasterPaymentOrder components and enhance seeding process
- Updated record title attribute in VisaMasterPaymentOrderResource to 'unique_id'. - Improved schema layout in VisaMasterPaymentOrderForm and VisaMasterPaymentOrderInfolist for better user experience. - Added 'unique_id' field to VisaMasterPaymentOrderInfolist with styling adjustments. - Implemented BelongsToBranch interface in VisaMasterPaymentOrder model and added a boot method for loan order creation. - Expanded FillJsonData seeder to include migration for VisaMasterPaymentOrders.
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
namespace App\Modules\VisaMasterPaymentOrder\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Modules\Branch\Interfaces\BelongsToBranch;
|
||||
use App\Modules\Branch\Models\Branch;
|
||||
use App\Modules\LoanOrder\Repositories\LoanOrderRepository;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
@@ -35,7 +37,7 @@ use Spatie\MediaLibrary\InteractsWithMedia;
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
*/
|
||||
class VisaMasterPaymentOrder extends Model implements HasMedia
|
||||
class VisaMasterPaymentOrder extends Model implements HasMedia, BelongsToBranch
|
||||
{
|
||||
use InteractsWithMedia;
|
||||
use SoftDeletes;
|
||||
@@ -116,4 +118,14 @@ class VisaMasterPaymentOrder extends Model implements HasMedia
|
||||
$this->addMediaCollection('sender_passport_local_old')->singleFile();
|
||||
$this->addMediaCollection('sender_passport_local_old_replacement')->singleFile();
|
||||
}
|
||||
|
||||
/**
|
||||
* "boot" method for model
|
||||
*/
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::created(LoanOrderRepository::created());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user