mirror of
https://gitee.com/ulthon/ul-file-share.git
synced 2026-07-06 21:22:47 +08:00
初始化项目
This commit is contained in:
27
app/model/User.php
Normal file
27
app/model/User.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\model;
|
||||
|
||||
use think\Model;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* @mixin think\Model
|
||||
*/
|
||||
class User extends Model
|
||||
{
|
||||
//
|
||||
|
||||
use SoftDelete;
|
||||
|
||||
protected $defaultSoftDelete = 0;
|
||||
|
||||
public function getAvatarAttr($value)
|
||||
{
|
||||
if(empty($value)){
|
||||
return '/static/images/avatar.png';
|
||||
}
|
||||
|
||||
return \get_source_link($value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user