hasMany('app\common\model\tcm\Diagnosis', 'patient_id', 'patient_id'); } /** * @notes 检查是否过期 */ public function isExpired(): bool { return $this->expire_time > 0 && $this->expire_time < time(); } /** * @notes 更新最后登录时间 */ public function updateLastLogin(): bool { $this->last_login_time = time(); return $this->save(); } }