// +---------------------------------------------------------------------- // | 官方网站: https://thinkadmin.top // +---------------------------------------------------------------------- // | 免责声明 ( https://thinkadmin.top/disclaimer ) // | 会员免费 ( https://thinkadmin.top/vip-introduce ) // +---------------------------------------------------------------------- // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin // +---------------------------------------------------------------------- namespace app\data\model; use think\admin\Model; /** * 商城商品标题模型 * Class ShopGoodsMark * @package app\data\model */ class ShopGoodsMark extends Model { /** * 获取所有标签 * @return array */ public static function items(): array { $map = ['status' => 1]; return static::mk()->where($map)->order('sort desc,id desc')->column('name'); } /** * 格式化创建时间 * @param string $value * @return string */ public function getCreateAtAttr(string $value): string { return format_datetime($value); } }