<?php
declare(strict_types=1);

namespace app\common\model;

use app\common\model\base\BaseModel;

class ProductConfig extends BaseModel
{


    //获取规格重量
    public static function getWeight(int $id): float|string|null
    {
        return self::where('id', $id)->value('weight');
    }

    //获取规格信息
    public static function getInfo(int $id): float|string|null
    {
        return self::where('id', $id)->field('weight,title')->findOrEmpty();
    }
      

}
