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); + } +}