feat : pay

This commit is contained in:
2025-02-17 16:46:41 +08:00
parent 1fb7bf4ea7
commit 8e6c6f9cb1
13 changed files with 353 additions and 13 deletions

56
app/Model/PayOrder.php Normal file
View File

@@ -0,0 +1,56 @@
<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\Database\Concerns\BuildsQueries;
use Hyperf\Database\Model\Builder;
use Hyperf\DbConnection\Model\Model;
/**
* @property int $id
* @property int $user_id
* @property int $order_id
* @property int $order_type
* @property string $order_no
* @property string $pay_money
* @property int $recharge_type
* @property int $status
* @property string $alipay_transaction_id
* @property string $wx_transaction_id
* @property string $create_time
* @property string $notify_json
*/
class PayOrder extends Model
{
/**
* The table associated with the model.
*/
protected ?string $table = 'pay_order';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = [];
protected array $guarded = [];
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['id' => 'integer', 'user_id' => 'integer', 'order_id' => 'integer', 'order_type' => 'integer', 'recharge_type' => 'integer', 'status' => 'integer'];
const string CREATED_AT = 'create_time';
const null UPDATED_AT = null;
/**
* @param int $id
* @param int $type
* @return \Hyperf\Database\Model\Model|null
*/
public function getInfoByOrderIdAndType(int $id,int $type): \Hyperf\Database\Model\Model|null
{
return $this->where('order_id',$id)->where('order_type',$type)->first();
}
}