ReadLog.php 561 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Modules\User\Models;
  3. use App\Modules\TableSuffix;
  4. use Illuminate\Database\Eloquent\Model;
  5. class ReadLog extends Model
  6. {
  7. use TableSuffix;
  8. protected $table = 'read_logs';
  9. protected $fillable = [
  10. 'distribution_channel_id',
  11. 'bid',
  12. 'cid',
  13. 'uid',
  14. 'send_order_id',
  15. 'from',
  16. 'attach',
  17. 'sequence',
  18. ];
  19. protected $connection = 'qapp_log_mysql';
  20. public static function model(int $uid)
  21. {
  22. self::suffix($uid % 1024);
  23. return new static;
  24. }
  25. }