feat: 项目基础框架+配置+Kernel
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AiOrder extends Model
|
||||
{
|
||||
protected $table = 'ai_order';
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
|
||||
|
||||
public function getCurrencyNameAttribute()
|
||||
{
|
||||
return $this->hasOne('App\Currency', 'id', 'currency_id')->value('name');
|
||||
}
|
||||
|
||||
public function getDualNameAttribute()
|
||||
{
|
||||
return $this->hasOne('App\AiCurrency', 'id', 'ai_id')->value('name');
|
||||
}
|
||||
|
||||
public static function random_float($min, $max) {
|
||||
return $min + mt_rand() / mt_getrandmax() * ($max - $min);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user