UniAccount.php 716 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Author: 芸众商城 www.yunzshop.com
  5. * Date: 2017/4/7
  6. * Time: 上午9:53
  7. */
  8. namespace app\common\models;
  9. use app\common\models\member\MemberShopInfo as YzMember;
  10. class UniAccount extends BaseModel
  11. {
  12. protected $guarded = [];
  13. public $table = 'uni_account';
  14. public $primaryKey = 'uniacid';
  15. public function __construct()
  16. {
  17. if (config('app.framework') == 'platform') {
  18. $this->table = 'yz_uniacid_app';
  19. }
  20. }
  21. public static function checkIsExistsAccount($uniacid)
  22. {
  23. return self::find($uniacid);
  24. }
  25. public static function getEnable(){
  26. return YzMember::select('uniacid')->distinct()->get();
  27. }
  28. }