Add branch & province model

This commit is contained in:
2023-11-23 15:34:04 +05:00
parent 0309e8f7d8
commit fe68420bab
11 changed files with 490 additions and 5 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Models\Branch;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Branch extends Model
{
use HasFactory;
/**
* Table name
* @var string
*/
protected $table = 'branches';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'region',
'province_id',
'unique_code',
'billing_username',
'billing_password',
'address',
];
/**
* Translatable fields
*
* @var array<string>
*/
public $translatable = [
'name',
'address',
];
}

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models\System\Location;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;
class Province extends Model
{
use HasFactory;
use HasTranslations;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'region',
'name',
];
/**
* Translatable fields
*
* @var array<string>
*/
public $translatable = ['name'];
}