update marketing
All checks were successful
All checks were successful
This commit is contained in:
63
Modules/MarketingAddon/App/Models/MessageReport.php
Normal file
63
Modules/MarketingAddon/App/Models/MessageReport.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?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'];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user