AdminLog.php 883 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. namespace fecadmin\models;
  10. use Yii;
  11. use yii\db\ActiveRecord;
  12. use fec\helpers\CUrl;
  13. /**
  14. * @author Terry Zhao <2358269014@qq.com>
  15. * @since 1.0
  16. */
  17. class AdminLog extends ActiveRecord
  18. {
  19. public static function tableName()
  20. {
  21. return '{{%admin_visit_log}}';
  22. }
  23. /*
  24. public function rules()
  25. {
  26. $current_rules = [
  27. [['name', 'parent_id','url_key',], 'required'],
  28. ['sort_order','validateSortOrder'],
  29. ];
  30. return $current_rules;
  31. }
  32. public function validateSortOrder($attribute,$params){
  33. if($order = $this->sort_order){
  34. if(!is_numeric($order)){
  35. $this->addError($attribute,"sort_order must be numeric");
  36. }
  37. }
  38. }
  39. */
  40. }