UserUr.php 558 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/3
  6. * Time: 下午2:25
  7. */
  8. namespace common\models;
  9. //use yii\db\ActiveRecord;
  10. class UserUr extends Common
  11. {
  12. public static function primaryKey(){
  13. return [''];
  14. }
  15. public function rules()
  16. {
  17. return [
  18. ['uid','number'],
  19. [['uid','rid'],'required'],
  20. ];
  21. }
  22. public function getList($uid)
  23. {
  24. return self::find()->andWhere(['uid'=>$uid])->asArray()->all();
  25. }
  26. }