EmailLog.php 521 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Http\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. /**
  5. * 邮件发送日志
  6. * Class EmailLog
  7. * @package App\Http\Models
  8. */
  9. class EmailLog extends Model
  10. {
  11. protected $table = 'email_log';
  12. protected $primaryKey = 'id';
  13. public $timestamps = false;
  14. protected $fillable = [
  15. 'user_id',
  16. 'title',
  17. 'content',
  18. 'status',
  19. 'error',
  20. 'created_at'
  21. ];
  22. function user() {
  23. return $this->hasOne(User::class, 'id', 'user_id');
  24. }
  25. }