12345678910111213141516171819 |
- <?php
- namespace app\model;
- use think\Model;
- class ExamPaper extends Model
- {
- public $got_total_score = 0;
- public $done = 0;
- public $checked = 0;
- //relaitonship
- public function questions(){
- return $this->belongsToMany('ExamQuestion','exam_paper_question','question_id','paper_id');
- }
- public function result(){
- return $this->hasMany('ExamEmpResult','paper_id');
- }
- }
|