CommentConfig.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Name: 芸众商城系统
  5. * Author: 广州市芸众信息科技有限公司
  6. * Profile: 广州市芸众信息科技有限公司位于国际商贸中心的广州,专注于移动电子商务生态系统打造,拥有芸众社交电商系统、区块链数字资产管理系统、供应链管理系统、电子合同等产品/服务。官网 :www.yunzmall.com www.yunzshop.com
  7. * Date: 2022/1/10
  8. * Time: 17:14
  9. */
  10. namespace app\common\models\comment;
  11. use Illuminate\Database\Eloquent\SoftDeletes;
  12. use app\common\models\BaseModel;
  13. class CommentConfig extends BaseModel
  14. {
  15. use SoftDeletes;
  16. public $table = 'yz_comment_config';
  17. public $timestamps = true;
  18. protected $guarded = [];
  19. /**
  20. * @param string $column
  21. * @return mixed
  22. */
  23. public static function getSetConfig($column = '')
  24. {
  25. if ($column) {
  26. return static::uniacid()->first()->$column;
  27. } else {
  28. return static::uniacid()->first();
  29. }
  30. }
  31. //评分纬度
  32. public static function isScoreLatitude(): bool
  33. {
  34. return self::getSetConfig('is_score_latitude') ?? false;
  35. }
  36. }