ChatMessage.php 402 B

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