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
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class DualOrder extends Model
{
protected $table = 'dual_order';
public $timestamps = false;
protected $appends = ['currency_name','dual_name'];
public function getCurrencyNameAttribute()
{
return $this->hasOne('App\Currency', 'id', 'currency_id')->value('name');
}
public function getDualNameAttribute()
{
return $this->hasOne('App\DualCurrency', 'id', 'dual_id')->value('name');
}
public static function random_float($min, $max) {
return $min + mt_rand() / mt_getrandmax() * ($max - $min);
}
}