feat: harden tenant settings and import pipeline
This commit is contained in:
@@ -2,36 +2,31 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class PurchaseHistory extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'purchase_history';
|
||||
|
||||
public $timestamps = false;
|
||||
public $incrementing = false;
|
||||
protected $keyType = 'string';
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'tenant_id',
|
||||
'package_id',
|
||||
'credits_added',
|
||||
'price',
|
||||
'currency',
|
||||
'platform',
|
||||
'transaction_id',
|
||||
'purchased_at',
|
||||
];
|
||||
|
||||
|
||||
protected $casts = [
|
||||
'credits_added' => 'integer',
|
||||
'price' => 'decimal:2',
|
||||
'purchased_at' => 'datetime',
|
||||
'created_at' => 'datetime',
|
||||
];
|
||||
|
||||
|
||||
public function tenant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Tenant::class);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user