Banner.php 784 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\common\model;
  3. use app\common\model\Sms;
  4. use app\common\library\Email;
  5. use phpDocumentor\Reflection\Type;
  6. use think\Model;
  7. use app\common\library\Common;
  8. use think\facade\Validate;
  9. use think\Request;
  10. use think\Db;
  11. /**
  12. * banner
  13. */
  14. class Banner Extends Model
  15. {
  16. // 开启自动写入时间戳字段
  17. protected $autoWriteTimestamp = 'TIMESTAMP';
  18. // 定义时间戳字段名
  19. protected $createTime = 'create_at';
  20. protected $updateTime = false;
  21. protected $table = 'q_banner';
  22. /**
  23. * banner
  24. */
  25. public static function BannerList(){
  26. $list = self::where('is_del',1)
  27. ->where('is_show',1)
  28. ->order('sort desc')
  29. ->select();
  30. return Common::return_success('成功',$list);
  31. }
  32. }