feat:재무 모듈 모델 8종 추가 (Customer, Income, Expense, SalesRecord, Purchase, ConsultingFee, CustomerSettlement, Subscription)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
29
app/Models/Finance/Subscription.php
Normal file
29
app/Models/Finance/Subscription.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
namespace App\Models\Finance;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Subscription extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'subscriptions';
|
||||
|
||||
protected $fillable = [
|
||||
'tenant_id', 'customer', 'plan', 'monthly_fee', 'billing_cycle',
|
||||
'start_date', 'next_billing', 'status', 'users', 'memo',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'monthly_fee' => 'integer',
|
||||
'users' => 'integer',
|
||||
'start_date' => 'date',
|
||||
'next_billing' => 'date',
|
||||
];
|
||||
|
||||
public function scopeForTenant($query, $tenantId)
|
||||
{
|
||||
return $query->where('tenant_id', $tenantId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user