<?php
/*
 * @Author: taowj 965042433@qq.com
 * @Date: 2023-07-14 16:33:11
 * @LastEditors: taowj 965042433@qq.com
 * @LastEditTime: 2023-07-21 11:09:07
 * @FilePath: \zhupu\application\admin\model\worship\Worshiphallmodel.php
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

namespace app\admin\model\worship;

use think\Model;


class Worshiphallmodel extends Model
{





    // 表名
    protected $name = 'worship_hall';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [];

    public function getStatusList()
    {
        return ['0' => __('Is_closed 0'), '1' => __('Is_closed 1')];
    }
    /**
     * 单个数据查询
     */
    public static function dataInfo($where,$field="*")
    {
        return  self::field("*")->where($where)->find();
    }
    /**
     * 批量查询列表
     */
    public static function dataList($where, $page, $limit, $order = "id DESC",$field="*")
    {
        $data = self::field("*")->where($where)->page($page)->limit($limit)->order($order)->select();
        return $data;
    }
}
