feat: 项目基础框架+配置+Kernel

This commit is contained in:
testadmin
2026-04-29 05:35:00 +08:00
parent 6ce7adcbfb
commit 9a6151fce3
5082 changed files with 437062 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class CoinTrade extends Model
{
public $table = 'coin_trade';
const TRADE_TYPE_SELL = 2;
const TRADE_TYPE_BUY = 1;
public static function newTrade($userId,$type,$currencyId,$legalId,$amount,$tradePrice,$targetPrice){
$fee = Setting::getValueByKey('COIN_TRADE_FEE');
$tmp = new self();
$tmp->num = time().$userId;
$tmp->u_id = $userId;
$tmp->currency_id = $currencyId;
$tmp->legal_id = $legalId;
$tmp->type = $type;
$tmp->target_price = $targetPrice;
$tmp->trade_price = $tradePrice;
$tmp->trade_amount = $amount;
$tmp->charge_fee = $fee;
$tmp->save();
return $tmp;
}
}