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

EasyParcelAccount.php 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 connected EasyParcel account. Parcels booked from the store are paid from its credit.
  9. *
  10. * @property int $id
  11. * @property int $store_id
  12. * @property string|null $account_name
  13. * @property string $access_token
  14. * @property string|null $refresh_token
  15. * @property CarbonInterface|null $expires_at
  16. * @property-read Store $store
  17. */
  18. #[Fillable(['account_name', 'access_token', 'refresh_token', 'expires_at'])]
  19. class EasyParcelAccount extends Model
  20. {
  21. protected $table = 'easyparcel_accounts';
  22. protected $hidden = ['access_token', 'refresh_token'];
  23. /**
  24. * @return BelongsTo<Store, $this>
  25. */
  26. public function store(): BelongsTo
  27. {
  28. return $this->belongsTo(Store::class);
  29. }
  30. /**
  31. * @return array<string, string>
  32. */
  33. protected function casts(): array
  34. {
  35. return [
  36. 'access_token' => 'encrypted',
  37. 'refresh_token' => 'encrypted',
  38. 'expires_at' => 'datetime',
  39. ];
  40. }
  41. }