Bill.php 602 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\api\model\profit;
  3. use app\api\model\BaseModel;
  4. class Bill extends BaseModel
  5. {
  6. // 表名
  7. protected $name = 'profit_bill';
  8. // 自动写入时间戳字段
  9. protected $autoWriteTimestamp = false;
  10. // 定义时间戳字段名
  11. protected $createTime = false;
  12. public function fetchProfitBill($people_type, $target_id, $page, $size)
  13. {
  14. return $this->where([
  15. "identity_type" => $people_type,
  16. "target_id" => $target_id,
  17. ])->order("createtime", "desc")
  18. ->page($page)
  19. ->paginate($size);
  20. }
  21. }