50 lines
1.2 KiB
PHP
50 lines
1.2 KiB
PHP
<?php
|
|
namespace Yunshop\CulturalSpace\models;
|
|
|
|
|
|
use app\common\models\BaseModel;
|
|
use app\common\models\Order;
|
|
use app\common\models\OrderGoods;
|
|
use app\common\models\UniAccount;
|
|
use app\common\facades\Setting;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class ContributionBonus extends BaseModel{
|
|
|
|
public $table = 'yz_cultural_space_contribution_bonus';
|
|
public $timestamps = false;
|
|
protected $hidden = ['uniacid'];
|
|
public $casts = [
|
|
'start_time' => 'datetime:Y-m-d H:i:s',
|
|
'end_time' => 'datetime:Y-m-d H:i:s',
|
|
'created_at' => 'datetime:Y-m-d H:i:s',
|
|
];
|
|
protected $fillable = ['uniacid','uid','order_total_money','contribution_bonus_ratio','total_money','start_time','end_time','created_at'];
|
|
|
|
|
|
/**
|
|
* Common: 获取周期记录列表
|
|
* Author: wu-hui
|
|
* Time: 2023/11/03 16:00
|
|
* @return array
|
|
*/
|
|
public function getList(){
|
|
$list = self::uniacid()
|
|
->select(['id','order_total_money','contribution_bonus_ratio','total_money','start_time','end_time','created_at'])
|
|
->orderBy('created_at','DESC')
|
|
->orderBy('id','DESC')
|
|
->paginate(10);
|
|
|
|
return $list ? $list->toArray() : [];
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|