12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace App\Models\Channel;
- use Illuminate\Database\Eloquent\Model;
- use DB;
- class Channel extends Model
- {
- protected $table = 'distribution_channels';
- protected $fillable = ['id', 'name','channel_type', 'pay_merchant_id', 'phone', 'nickname', 'person_in_charge_name',
- 'latest_login_time', 'remark', 'latest_login_ip', 'password', 'register_ip', 'is_enabled',
- 'distribution_manages_id', 'channel_user_id', 'site_nick_name','property', 'pay_id'];
- static function getById($id)
- {
- return self::where('id', $id)->first();
- }
- /**
- * 获取渠道信息
- * @return mixed
- */
- static function getDistributionChannel($distribution_channel_id)
- {
- return self::where('id', $distribution_channel_id)->select('id', 'phone', 'nickname', 'channel_user_id', 'pay_merchant_id', 'site_nick_name', 'property')->first();
- }
- }
|