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
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class InsuranceType extends Model
{
//
protected $table = 'insurance_types';
public $timestamps = false;
protected $guarded = [];
protected $appends = [
'currency_name',
'type_name',
];
public function getCurrencyNameAttribute()
{
$currency_id = $this->getAttribute('currency_id');
$currency_name = Currency::where('id', $currency_id)->first()->name;
return $currency_name;
}
public function getTypeNameAttribute()
{
$type = $this->getAttribute('type');
if ($type == 1) {
$type_name = '正向险';
} elseif ($type == 2) {
$type_name = '反向险';
} else {
$type_name = '未知';
}
return $type_name;
}
}