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
+69
View File
@@ -0,0 +1,69 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Currency;
use App\BindBox;
class BindBoxSuccessOrder extends Model
{
protected $table = 'bind_box_success_order';
public $timestamps = false;
protected $appends = [
'currency_name',
'image',
'end_time',
'name',
'price',
];
public function currency()
{
return $this->belongsTo(Currency::class);
}
public function getCurrencyNameAttribute()
{
return $this->currency()->value('name');
}
public function getPriceAttribute()
{
$BindBox = BindBox::where('code',$this->attributes['code'])->first();
if (!empty($BindBox)) {
return $BindBox->price;
}
return '';
}
public function getImageAttribute()
{
$BindBox = BindBox::where('code',$this->attributes['code'])->first();
if (!empty($BindBox)) {
return $BindBox->image;
}
return '';
}
public function getEndTimeAttribute()
{
$BindBox = BindBox::where('code',$this->attributes['code'])->first();
if (!empty($BindBox)) {
return $BindBox->end_time;
}
return '';
}
public function getNameAttribute()
{
$BindBox = BindBox::where('code',$this->attributes['code'])->first();
if (!empty($BindBox)) {
return $BindBox->name;
}
return '';
}
}