領収証発行サービス
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

33 行
655B

  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Concerns\HasUuids;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. use Illuminate\Support\Str;
  6. abstract class AppModel extends BaseModel
  7. {
  8. use SoftDeletes, HasUuids;
  9. public function getHistory(): ?HistoryModel
  10. {
  11. $historyName = static::class . 'History';
  12. return new $historyName;
  13. }
  14. public function getChangeLogMessage($before, $after): ?string
  15. {
  16. return null;
  17. }
  18. public function setId(?string $uuid = null)
  19. {
  20. if ($uuid) {
  21. $this->id = $uuid;
  22. } else {
  23. $this->id = Str::uuid();
  24. }
  25. }
  26. }