Adminlog.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace app\modules\admin\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%adminlog}}".
  6. *
  7. * @property int $log_id ID
  8. * @property string $module 模块ID
  9. * @property string $controller 控制器
  10. * @property string $action 动作
  11. * @property string $query_string url请求
  12. * @property int $admin_id 操作者ID
  13. * @property int $ip IP
  14. * @property string $message 日志详细信息
  15. * @property string|null $data 请求数据
  16. * @property int $create_time 时间
  17. */
  18. class Adminlog extends \app\common\models\EActiveRecord
  19. {
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public static function tableName()
  24. {
  25. return '{{%adminlog}}';
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function rules()
  31. {
  32. return [
  33. [['admin_id'], 'required'],
  34. [['admin_id', 'ip', 'create_time'], 'integer'],
  35. [['data'], 'string'],
  36. [['module', 'controller', 'action'], 'string', 'max' => 50],
  37. [['query_string', 'message'], 'string', 'max' => 255],
  38. ];
  39. }
  40. /**
  41. * {@inheritdoc}
  42. */
  43. public function attributeLabels()
  44. {
  45. return [
  46. 'log_id' => 'ID',
  47. 'module' => '模块ID',
  48. 'controller' => '控制器',
  49. 'action' => '动作',
  50. 'query_string' => 'url请求',
  51. 'admin_id' => '操作者ID',
  52. 'ip' => 'IP',
  53. 'message' => '日志详细信息',
  54. 'data' => '请求数据',
  55. 'create_time' => '时间',
  56. ];
  57. }
  58. }