AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

StripeAccount.php 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace App\Models;
  3. use Carbon\CarbonInterface;
  4. use Illuminate\Database\Eloquent\Attributes\Fillable;
  5. use Illuminate\Database\Eloquent\Model;
  6. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  7. /**
  8. * A store's own Stripe account (Stripe Connect). Shoppers' payments go straight into it.
  9. *
  10. * @property int $id
  11. * @property int $store_id
  12. * @property string $account_id Stripe's id, such as acct_1Abc...
  13. * @property bool $charges_enabled Stripe lets the account take payments
  14. * @property bool $payouts_enabled Stripe pays the money into the merchant's bank
  15. * @property bool $details_submitted The merchant finished Stripe's sign-up form
  16. * @property bool $fpx_requested
  17. * @property CarbonInterface|null $checked_at When we last asked Stripe
  18. * @property CarbonInterface|null $created_at
  19. * @property CarbonInterface|null $updated_at
  20. * @property-read Store $store
  21. */
  22. #[Fillable(['account_id', 'charges_enabled', 'payouts_enabled', 'details_submitted', 'fpx_requested', 'checked_at'])]
  23. class StripeAccount extends Model
  24. {
  25. /**
  26. * @return BelongsTo<Store, $this>
  27. */
  28. public function store(): BelongsTo
  29. {
  30. return $this->belongsTo(Store::class);
  31. }
  32. /**
  33. * @return array<string, string>
  34. */
  35. protected function casts(): array
  36. {
  37. return [
  38. 'charges_enabled' => 'boolean',
  39. 'payouts_enabled' => 'boolean',
  40. 'details_submitted' => 'boolean',
  41. 'fpx_requested' => 'boolean',
  42. 'checked_at' => 'datetime',
  43. ];
  44. }
  45. }