tests:import and exporting

This commit is contained in:
hackerESQ
2024-10-28 19:20:52 -05:00
parent 82a84cec97
commit d5f25c6f76
5 changed files with 85 additions and 4 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ class DailyChangesSheet implements ToCollection, WithHeadingRow, WithValidation,
public function rules(): array
{
return [
'portfolio_id' => ['required'],
'portfolio_id' => ['required', 'uuid'],
'date' => ['required', 'date'],
'total_market_value' => ['sometimes', 'nullable', 'numeric'],
'total_cost_basis' => ['sometimes', 'nullable', 'min:0', 'numeric'],
+1 -1
View File
@@ -58,7 +58,7 @@ class PortfoliosSheet implements ToCollection, WithValidation, WithHeadingRow, S
public function rules(): array
{
return [
'portfolio_id' => ['sometimes', 'nullable'],
'portfolio_id' => ['sometimes', 'nullable', 'uuid'],
'title' => ['required', 'string'],
'wishlist' => ['sometimes', 'nullable', 'boolean'],
'notes' => ['sometimes', 'nullable', 'string'],
+2 -2
View File
@@ -106,9 +106,9 @@ class TransactionsSheet implements ToCollection, WithHeadingRow, WithValidation,
public function rules(): array
{
return [
'transaction_id' => ['sometimes', 'nullable'],
'transaction_id' => ['sometimes', 'nullable', 'uuid'],
'symbol' => ['required', 'string'],
'portfolio_id' => ['required'],
'portfolio_id' => ['required', 'uuid'],
'quantity' => ['required', 'min:0', 'numeric'],
'transaction_type' => ['required', 'in:BUY,SELL'],
'date' => ['required', 'date'],