Ai_GirlFriend/xunifriend_RaeeC/application/common/model/IntimacyConfig.php

33 lines
748 B
PHP
Raw Normal View History

2026-01-31 19:15:41 +08:00
<?php
namespace app\common\model;
use think\Model;
class IntimacyConfig extends Model
{
protected $name = 'intimacy_config';
protected $autoWriteTimestamp = 'int';
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $append = [
'createtime_text',
];
public function getImageAttr($value)
{
return get_full_image_url($value);
}
protected function getCreatetimeTextAttr($value, $data)
{
$value = $value ? $value : $data['createtime'];
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public static function getList()
{
$list = self::order('weigh', 'desc')->select();
return $list;
}
}