| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
-
- namespace App\Models;
-
- use Carbon\CarbonInterface;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
-
- /**
- * The short daily note at the top of the dashboard ("Store pulse"). See App\Dashboard\StorePulse.
- *
- * @property int $id
- * @property int $user_id
- * @property int|null $store_id Null for the note about all stores
- * @property string $day The Malaysian day, as YYYY-MM-DD
- * @property string $summary
- * @property string $source "ai" or "numbers"
- * @property int $rewrites
- * @property string|null $provider
- * @property string|null $model
- * @property int $input_tokens
- * @property int $output_tokens
- * @property CarbonInterface|null $created_at
- * @property CarbonInterface|null $updated_at
- */
- class DashboardPulse extends Model
- {
- protected $guarded = ['id'];
-
- /**
- * @return BelongsTo<User, $this>
- */
- public function user(): BelongsTo
- {
- return $this->belongsTo(User::class);
- }
-
- /**
- * @return array<string, string>
- */
- protected function casts(): array
- {
- return [
- 'rewrites' => 'integer',
- 'input_tokens' => 'integer',
- 'output_tokens' => 'integer',
- ];
- }
- }
|