<?php

namespace app\admin\model\worship;

use think\Model;


class Worshiplogmodel extends Model
{





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

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

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

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

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