ChapterOrder.php 671 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Modules\UserTask\Models;
  3. use App\Modules\TableSuffix;
  4. use Illuminate\Database\Eloquent\Model;
  5. class ChapterOrder extends Model
  6. {
  7. use TableSuffix;
  8. protected $connection = 'chapter_order_mysql';
  9. protected $fillable = [
  10. 'distribution_channel_id',
  11. 'bid',
  12. 'cid',
  13. 'chapter_name',
  14. 'book_name',
  15. 'uid',
  16. 'u',
  17. 'fee',
  18. 'book_name',
  19. 'send_order_id',
  20. 'charge_balance',
  21. 'reward_balance'
  22. ];
  23. protected $table = 'chapter_orders';
  24. public static function model(int $uid)
  25. {
  26. self::suffix($uid % 512);
  27. return new static;
  28. }
  29. }