CheckRecord.php 697 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Models;
  3. use Dcat\Admin\Traits\HasDateTimeFormatter;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Illuminate\Database\Eloquent\Relations\HasOne;
  6. use Illuminate\Database\Eloquent\SoftDeletes;
  7. /**
  8. * @method static where(string $key, string $value)
  9. *
  10. * @property int id
  11. * @property int user_id
  12. * @property string check_item
  13. * @property string end_time
  14. */
  15. class CheckRecord extends Model
  16. {
  17. use HasDateTimeFormatter;
  18. use SoftDeletes;
  19. protected $table = 'check_records';
  20. /**
  21. * 盘点记录有一个用户.
  22. *
  23. * @return HasOne
  24. */
  25. public function user(): HasOne
  26. {
  27. return $this->hasOne(User::class, 'id', 'user_id');
  28. }
  29. }