bodySql.php 698 字节
<?php

namespace Model;

/**
 * body
 * @author:dc
 * @time 2023/3/23 10:13
 * Class bodySql
 * @package Model
 */
class bodySql {

    public static $table = 'bodies';


    /**
     *
     * @param int $id
     * @return string
     * @author:dc
     * @time 2023/3/23 10:15
     */
    public static function first(int $id):string {
        return "select * from `".static::$table."` where `lists_id` = {$id} limit 1";
    }

    /**
     * has
     * @param int $id
     * @return string
     * @author:dc
     * @time 2023/3/23 10:15
     */
    public static function has(int $id){
        return "select count(*) from `".static::$table."` where `lists_id` = {$id} limit 1";
    }



}