SessionStorage.php 767 B

123456789101112131415161718192021222324252627282930313233343536
  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 fecshop\models\redis;
  10. use yii\redis\ActiveRecord;
  11. /**
  12. * @author Terry Zhao <2358269014@qq.com>
  13. * @since 1.0
  14. */
  15. class SessionStorage extends ActiveRecord
  16. {
  17. public static function primaryKey()
  18. {
  19. return ['id'];
  20. }
  21. public function attributes()
  22. {
  23. return [
  24. 'id', 'session_uuid',
  25. 'session_key', 'session_value',
  26. 'session_timeout','session_updated_at'
  27. ];
  28. }
  29. /**
  30. * relations can not be defined via a table as there are not tables in redis. You can only define relations via other records.
  31. */
  32. }