<?php

declare(strict_types=1);

namespace app\admin\model;

use app\common\model\traits\TimestampInteger;
use support\think\Model;

class AdminRule extends Model
{
    use TimestampInteger;

    protected string $table = 'admin_rule';
    protected string $pk = 'id';
    protected bool $autoWriteTimestamp = true;

    public function setComponentAttr($value)
    {
        if ($value) $value = str_replace('\\', '/', $value);
        return $value;
    }
}
