All checks were successful
Deploy api / deploy (push) Successful in 22s
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
39 lines
819 B
PHP
39 lines
819 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* 継続課金会員登録モデル
|
|
*/
|
|
class CreditSubscription extends Model
|
|
{
|
|
protected $table = 'credit_subscription';
|
|
protected $primaryKey = 'credit_subscription_id';
|
|
public $timestamps = true;
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'credit_member_id',
|
|
'credit_card_seq',
|
|
'subscription_status',
|
|
'registered_at',
|
|
'operator_id',
|
|
];
|
|
|
|
protected $casts = [
|
|
'registered_at' => 'datetime',
|
|
'subscription_status' => 'integer',
|
|
];
|
|
|
|
/**
|
|
* 利用者リレーション
|
|
*/
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id', 'user_id');
|
|
}
|
|
}
|