<?php namespace app\common\model; use think\Model; /** * 模型 */ class ViewUserSkill extends Model { // 开启自动写入时间戳字段 protected $autoWriteTimestamp = 'int'; /** * 根据用户ID获取该用户所有技能-只做显示 */ public function getSkillInfo($user_id) { $where = []; $where["user_id"] = $user_id; return Model("ViewUserSkill")->where($where)->column("skill_name"); } /** * 根据用户ID获取该用户所有技能-带ID */ public function getSkillInfoId($user_id) { $where = []; $where["user_id"] = $user_id; return Model("ViewUserSkill")->where($where)->select(); } }