Collect.php 451 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Collect extends Model
  5. {
  6. protected $guarded = [];
  7. protected function serializeDate(\DateTimeInterface $date)
  8. {
  9. return $date->format('Y-m-d H:i:s');
  10. }
  11. /**
  12. * 栏目 1:测评
  13. * @var integer
  14. */
  15. const COLUMN_1 = 1;
  16. public function scale(){
  17. return $this->belongsTo(Scale::class, 'object_id', 'id');
  18. }
  19. }