Channel.php 894 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Models\Channel;
  3. use Illuminate\Database\Eloquent\Model;
  4. use DB;
  5. class Channel extends Model
  6. {
  7. protected $table = 'distribution_channels';
  8. protected $fillable = ['id', 'name','channel_type', 'pay_merchant_id', 'phone', 'nickname', 'person_in_charge_name',
  9. 'latest_login_time', 'remark', 'latest_login_ip', 'password', 'register_ip', 'is_enabled',
  10. 'distribution_manages_id', 'channel_user_id', 'site_nick_name','property', 'pay_id'];
  11. static function getById($id)
  12. {
  13. return self::where('id', $id)->first();
  14. }
  15. /**
  16. * 获取渠道信息
  17. * @return mixed
  18. */
  19. static function getDistributionChannel($distribution_channel_id)
  20. {
  21. return self::where('id', $distribution_channel_id)->select('id', 'phone', 'nickname', 'channel_user_id', 'pay_merchant_id', 'site_nick_name', 'property')->first();
  22. }
  23. }