<?php
namespace app\model\diseasequestionanswer;

use think\Model;


class QuestionHistory extends Model
{

    /**
     * 表名
     */
    protected $table = "jm_question_history";


    public static function questionAnswerRecord($question , $answer , $phone)
    {
        $answer = $answer ? json_encode($answer) : '';

        /**
         * 记录提问问题123
         */
        QuestionHistory::create(
            [
                'phone'      => $phone,
                'question'   => $question,
                'answer'     => $answer,
                'createtime' => time()
            ]
        );
    }
}