Files
kulakpos_web/Modules/MarketingAddon/App/Models/MessageReport.php
eko54r 05fd3230b8
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped
update marketing
2026-05-14 11:55:22 +07:00

64 lines
1.2 KiB
PHP

<?php
namespace Modules\MarketingAddon\App\Models;
use App\Models\Business;
use App\Models\User;
use App\Traits\ImageUrlTrait;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class MessageReport extends Model
{
use HasFactory, ImageUrlTrait;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'title',
'business_id',
'template_id',
'smsgateway_id',
'user_id',
'channel',
'phone',
'message',
'attachment',
'send_at',
'status'
];
public function user()
{
return $this->belongsTo(User::class);
}
public function business()
{
return $this->belongsTo(Business::class);
}
public function smsgateway()
{
return $this->belongsTo(Smsgateway::class, 'smsgateway_id');
}
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'user_id' => 'integer',
'device_id' => 'integer',
'business_id' => 'integer',
'send_attempts' => 'integer',
];
protected $imageFields = ['attachment'];
}