CollegeTeacher.php 440 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace app\model;
  3. use DateTimeInterface;
  4. use support\Model;
  5. class CollegeTeacher extends Model
  6. {
  7. public $table = 'college_teacher';
  8. public $primaryKey = 'teacher_id';
  9. public $dateFormat = 'U';
  10. public const CREATED_AT = 'teacher_addTime';
  11. public const UPDATED_AT = 'teacher_updateTime';
  12. public function serializeDate(DateTimeInterface $date)
  13. {
  14. return $date->format('Y-m-d H:i:s');
  15. }
  16. }