AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

DashboardPulse.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace App\Models;
  3. use Carbon\CarbonInterface;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  6. /**
  7. * The short daily note at the top of the dashboard ("Store pulse"). See App\Dashboard\StorePulse.
  8. *
  9. * @property int $id
  10. * @property int $user_id
  11. * @property int|null $store_id Null for the note about all stores
  12. * @property string $day The Malaysian day, as YYYY-MM-DD
  13. * @property string $summary
  14. * @property string $source "ai" or "numbers"
  15. * @property int $rewrites
  16. * @property string|null $provider
  17. * @property string|null $model
  18. * @property int $input_tokens
  19. * @property int $output_tokens
  20. * @property CarbonInterface|null $created_at
  21. * @property CarbonInterface|null $updated_at
  22. */
  23. class DashboardPulse extends Model
  24. {
  25. protected $guarded = ['id'];
  26. /**
  27. * @return BelongsTo<User, $this>
  28. */
  29. public function user(): BelongsTo
  30. {
  31. return $this->belongsTo(User::class);
  32. }
  33. /**
  34. * @return array<string, string>
  35. */
  36. protected function casts(): array
  37. {
  38. return [
  39. 'rewrites' => 'integer',
  40. 'input_tokens' => 'integer',
  41. 'output_tokens' => 'integer',
  42. ];
  43. }
  44. }