From 0160628b1b4f6eeeecae2a61806bec15bcdf27cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Wed, 4 Feb 2026 22:43:55 +0900 Subject: [PATCH] =?UTF-8?q?feat:=EC=9E=AC=EB=AC=B4=20=EB=AA=A8=EB=93=88=20?= =?UTF-8?q?=EB=AA=A8=EB=8D=B8=208=EC=A2=85=20=EC=B6=94=EA=B0=80=20(Custome?= =?UTF-8?q?r,=20Income,=20Expense,=20SalesRecord,=20Purchase,=20Consulting?= =?UTF-8?q?Fee,=20CustomerSettlement,=20Subscription)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.5 --- app/Models/Finance/ConsultingFee.php | 29 ++++++++++++++++++++++ app/Models/Finance/Customer.php | 23 +++++++++++++++++ app/Models/Finance/CustomerSettlement.php | 30 +++++++++++++++++++++++ app/Models/Finance/Expense.php | 27 ++++++++++++++++++++ app/Models/Finance/Income.php | 27 ++++++++++++++++++++ app/Models/Finance/Purchase.php | 28 +++++++++++++++++++++ app/Models/Finance/SalesRecord.php | 28 +++++++++++++++++++++ app/Models/Finance/Subscription.php | 29 ++++++++++++++++++++++ 8 files changed, 221 insertions(+) create mode 100644 app/Models/Finance/ConsultingFee.php create mode 100644 app/Models/Finance/Customer.php create mode 100644 app/Models/Finance/CustomerSettlement.php create mode 100644 app/Models/Finance/Expense.php create mode 100644 app/Models/Finance/Income.php create mode 100644 app/Models/Finance/Purchase.php create mode 100644 app/Models/Finance/SalesRecord.php create mode 100644 app/Models/Finance/Subscription.php diff --git a/app/Models/Finance/ConsultingFee.php b/app/Models/Finance/ConsultingFee.php new file mode 100644 index 00000000..6a9c5203 --- /dev/null +++ b/app/Models/Finance/ConsultingFee.php @@ -0,0 +1,29 @@ + 'date', + 'hours' => 'integer', + 'hourly_rate' => 'integer', + 'amount' => 'integer', + ]; + + public function scopeForTenant($query, $tenantId) + { + return $query->where('tenant_id', $tenantId); + } +} diff --git a/app/Models/Finance/Customer.php b/app/Models/Finance/Customer.php new file mode 100644 index 00000000..ddaa2cc0 --- /dev/null +++ b/app/Models/Finance/Customer.php @@ -0,0 +1,23 @@ +where('tenant_id', $tenantId); + } +} diff --git a/app/Models/Finance/CustomerSettlement.php b/app/Models/Finance/CustomerSettlement.php new file mode 100644 index 00000000..1458ef43 --- /dev/null +++ b/app/Models/Finance/CustomerSettlement.php @@ -0,0 +1,30 @@ + 'integer', + 'commission' => 'integer', + 'expense' => 'integer', + 'net_amount' => 'integer', + 'settled_date' => 'date', + ]; + + public function scopeForTenant($query, $tenantId) + { + return $query->where('tenant_id', $tenantId); + } +} diff --git a/app/Models/Finance/Expense.php b/app/Models/Finance/Expense.php new file mode 100644 index 00000000..34994e7d --- /dev/null +++ b/app/Models/Finance/Expense.php @@ -0,0 +1,27 @@ + 'date', + 'amount' => 'integer', + ]; + + public function scopeForTenant($query, $tenantId) + { + return $query->where('tenant_id', $tenantId); + } +} diff --git a/app/Models/Finance/Income.php b/app/Models/Finance/Income.php new file mode 100644 index 00000000..367816c9 --- /dev/null +++ b/app/Models/Finance/Income.php @@ -0,0 +1,27 @@ + 'date', + 'amount' => 'integer', + ]; + + public function scopeForTenant($query, $tenantId) + { + return $query->where('tenant_id', $tenantId); + } +} diff --git a/app/Models/Finance/Purchase.php b/app/Models/Finance/Purchase.php new file mode 100644 index 00000000..18220d0b --- /dev/null +++ b/app/Models/Finance/Purchase.php @@ -0,0 +1,28 @@ + 'date', + 'amount' => 'integer', + 'vat' => 'integer', + ]; + + public function scopeForTenant($query, $tenantId) + { + return $query->where('tenant_id', $tenantId); + } +} diff --git a/app/Models/Finance/SalesRecord.php b/app/Models/Finance/SalesRecord.php new file mode 100644 index 00000000..a7cb0f9e --- /dev/null +++ b/app/Models/Finance/SalesRecord.php @@ -0,0 +1,28 @@ + 'date', + 'amount' => 'integer', + 'vat' => 'integer', + ]; + + public function scopeForTenant($query, $tenantId) + { + return $query->where('tenant_id', $tenantId); + } +} diff --git a/app/Models/Finance/Subscription.php b/app/Models/Finance/Subscription.php new file mode 100644 index 00000000..de812749 --- /dev/null +++ b/app/Models/Finance/Subscription.php @@ -0,0 +1,29 @@ + 'integer', + 'users' => 'integer', + 'start_date' => 'date', + 'next_billing' => 'date', + ]; + + public function scopeForTenant($query, $tenantId) + { + return $query->where('tenant_id', $tenantId); + } +}