链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
622 B

<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
class FinancialRecord extends Model
{
use HasDateTimeFormatter;
protected $dateFormat = 'U';
/**
* 根据用户id创建不同模型
* @param $user_id
* @return string
*/
public static function getFinancialRecordModel($user_id){
if ($user_id){
$buider = null;
$index = $user_id % 5;
$model_name = 'App\\Models\\'.'FinancialRecord'.$index;
$buider = new $model_name();
return $buider;
}
}
}