ArticleBrowerHistory.php 518 B

123456789101112131415161718192021222324252627
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\model;
  4. use think\Model;
  5. /**
  6. * @mixin \think\Model
  7. */
  8. class ArticleBrowerHistory extends Model
  9. {
  10. protected $schema = [
  11. "id" => "int", // id
  12. "ip" => "varchar", // ip地址
  13. "aid" => "int", // 文章id
  14. "create_time" => "int", // 创建时间
  15. ];
  16. protected $autoWriteTimestamp = false;
  17. public static function getByIpAid($ip, $aid)
  18. {
  19. return self::where('ip', $ip)->where('aid', $aid)->find();
  20. }
  21. }