tests:import and exporting
This commit is contained in:
@@ -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'],
|
||||
|
||||
@@ -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'],
|
||||
|
||||
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user