初始化

This commit is contained in:
liut
2021-10-12 11:06:24 +08:00
commit ff0b4d5b12
1270 changed files with 405680 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace app\common\model;
use think\Model;
use think\model\concern\SoftDelete;
class Stores extends Model
{
use SoftDelete;
protected $deleteTime = 'delete_time';
protected $autoWriteTimestamp = true;
public function getPolicy(){
$policy = Policys::get($this->policy_id);
if(empty($policy)){
return false;
}
return $policy;
}
public function getLocalSaveFilePath($save_dir,$filename): string
{
return env('root_path').'public'.getSafeDirSeparator($save_dir . $filename);
}
public function getLocalSaveFile($save_dir,$filename){
return str_replace(['/','\\','//','\\\\'],'/',($save_dir.$filename));
}
}