First Commit

This commit is contained in:
marco
2026-09-01 10:46:29 -03:00
commit bf96b77e9c
10000 changed files with 3508600 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace Modules\AffiliatesAdmin\Models;
use Illuminate\Database\Eloquent\Model;
class AffiliateBanner extends Model
{
protected $table = 'affiliate_banners';
protected $primaryKey = 'affiliate_banners_id';
protected $fillable = [
'affiliate_banners_name',
'affiliate_banners_description',
'affiliate_banners_image_url',
'affiliate_banners_target_url',
'affiliate_banners_width',
'affiliate_banners_height',
'affiliate_banners_is_active',
];
/**
* Get the affiliate that owns the banner.
*/
public function affiliate()
{
return $this->belongsTo(Affiliate::class, 'affiliate_banners_affiliate_id', 'affiliates_id');
}
/**
* Get the clicks for the banner.
*/
public function clicks()
{
return $this->hasMany(AffiliateClick::class, 'affiliate_clicks_banner_id', 'affiliate_banners_id');
}
}