<?php

namespace App\Models\goods\mysql;

use Api\PhpUtils\Mysql\MysqlBase;

/**
 * Class LifeAccountShopNum
 * 生活号下店铺的数量
 * @package App\Models\goods\mysql
 */
class LifeAccountShopNum extends MysqlBase
{
    const TABLE_NAME = 'life_account_shop_num';
    const CONFIG_INDEX = 'goods';
    const PRIMARY_KEY = 'life_account_id';

    public static function getRecord($where, $colums = [])
    {
        if (empty($colums)) {
            $colums = '*';
        }
        return self::get($colums, $where);
    }

    public static function getRecordMaster($where, $colums = [])
    {
        if (empty($colums)) {
            $colums = '*';
        }
        return self::selectMaster($colums, $where);
    }

    public static function save($data, $where = [])
    {
        if (empty($where)) {
            return self::insert($data);
        }
        return self::update($data, $where);
    }

    public static function deleteRecord($where)
    {
        return self::delete($where);
    }
}