feat(accounts): tambahkan model dan migrasi untuk tabel akun

- Menambahkan model Account dengan atribut yang dapat diisi.
- Menambahkan migrasi untuk membuat tabel accounts dengan kolom yang diperlukan.
This commit is contained in:
Daeng Deni Mardaeni
2025-02-18 16:30:31 +07:00
parent c0f32a6e16
commit d8740ea8f5
2 changed files with 64 additions and 0 deletions

31
app/Models/Account.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
namespace Modules\Webstatement\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
// use Modules\Webstatement\Database\Factories\AccountFactory;
class Account extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'account_number',
'customer_code',
'currency',
'opening_date',
'branch_code',
'product_category',
];
// Relationships
public function customer()
{
return $this->belongsTo(Customer::class, 'customer_code', 'customer_code');
}
}