| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
-
- namespace App\Models;
-
- use Carbon\CarbonInterface;
- use Illuminate\Database\Eloquent\Attributes\Fillable;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
-
- /**
- * A store's own Stripe account (Stripe Connect). Shoppers' payments go straight into it.
- *
- * @property int $id
- * @property int $store_id
- * @property string $account_id Stripe's id, such as acct_1Abc...
- * @property bool $charges_enabled Stripe lets the account take payments
- * @property bool $payouts_enabled Stripe pays the money into the merchant's bank
- * @property bool $details_submitted The merchant finished Stripe's sign-up form
- * @property bool $fpx_requested
- * @property CarbonInterface|null $checked_at When we last asked Stripe
- * @property CarbonInterface|null $created_at
- * @property CarbonInterface|null $updated_at
- * @property-read Store $store
- */
- #[Fillable(['account_id', 'charges_enabled', 'payouts_enabled', 'details_submitted', 'fpx_requested', 'checked_at'])]
- class StripeAccount extends Model
- {
- /**
- * @return BelongsTo<Store, $this>
- */
- public function store(): BelongsTo
- {
- return $this->belongsTo(Store::class);
- }
-
- /**
- * @return array<string, string>
- */
- protected function casts(): array
- {
- return [
- 'charges_enabled' => 'boolean',
- 'payouts_enabled' => 'boolean',
- 'details_submitted' => 'boolean',
- 'fpx_requested' => 'boolean',
- 'checked_at' => 'datetime',
- ];
- }
- }
|