migrate to gtea from bistbucket

This commit is contained in:
2026-03-15 17:08:23 +07:00
commit 129ca2260c
3716 changed files with 566316 additions and 0 deletions

71
app/Models/Business.php Normal file
View File

@@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Modules\AffiliateAddon\App\Models\Affiliate;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Business extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'plan_subscribe_id',
'business_category_id',
'companyName',
'address',
'phoneNumber',
'pictureUrl',
'will_expire',
'subscriptionDate',
'remainingShopBalance',
'shopOpeningBalance',
'vat_name',
'vat_no',
'affiliator_id',
'email',
'status',
'meta'
];
public function enrolled_plan()
{
return $this->belongsTo(PlanSubscribe::class, 'plan_subscribe_id');
}
public function category()
{
return $this->belongsTo(BusinessCategory::class, 'business_category_id');
}
public function user()
{
return $this->hasMany(User::class);
}
public function affiliator(): BelongsTo
{
return $this->belongsTo(Affiliate::class, 'affiliator_id');
}
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'plan_subscribe_id' => 'integer',
'business_category_id' => 'integer',
'remainingShopBalance' => 'double',
'shopOpeningBalance' => 'double',
'status' => 'integer',
'meta' => 'json',
];
}