SendOrderRechargeDayStat.php 959 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: hp
  5. * Date: 2017/11/22
  6. * Time: 14:15
  7. */
  8. namespace App\Modules\SendOrder\Models;
  9. use App\Modules\Book\Models\BookConfig;
  10. use DB;
  11. use Illuminate\Database\Eloquent\Model;
  12. class SendOrderRechargeDayStat extends Model
  13. {
  14. protected $table = 'send_order_recharge_day_stats';
  15. protected $fillable = ['send_order_id', 'book_name', 'bid', 'recharge_amount', 'order_num', 'paid_order_num',
  16. 'unpaid_order_num', 'distribution_channel_id', 'paid_user_num', 'date'];
  17. /**
  18. * @param $data
  19. * @return bool
  20. */
  21. public static function insertData($data)
  22. {
  23. if (empty($data)) {
  24. return false;
  25. }
  26. return self::insert($data);
  27. }
  28. /**
  29. * @param $where
  30. * @return bool
  31. */
  32. public static function deleteData($where)
  33. {
  34. if (empty($where)) {
  35. return false;
  36. }
  37. return self::where($where)->delete();
  38. }
  39. }