<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\PayConfig.
 *
 * @property int                             $id
 * @property string|null                     $mini_app_id           小程序ID
 * @property string|null                     $mini_app_key          小程序KEY
 * @property string                          $wechat_app_id         微信 APP_ID
 * @property string|null                     $wechat_app_key        微信 APP_KEY
 * @property string|null                     $wechat_apiclient_key  微信商户证书
 * @property string|null                     $wechat_apiclient_cert 微信证书密钥
 * @property string                          $alipay_app_id         ALIPAY_APP_ID
 * @property string|null                     $alipay_app_key        ALIPAY_PUBLIC_KEY
 * @property string|null                     $alipay_app_secret     ALIPAY 应用私钥
 * @property string                          $douyin_app_id         抖音_APP_ID
 * @property string|null                     $douyin_app_key        抖音_PUBLIC_KEY
 * @property string|null                     $douyin_app_secret     抖音_应用私钥
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \App\Models\Setting|null        $setting
 *
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig newQuery()
 * @method static \Illuminate\Database\Query\Builder|PayConfig onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig query()
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereAlipayAppId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereAlipayAppKey($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereAlipayAppSecret($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereDouyinAppId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereDouyinAppKey($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereDouyinAppSecret($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereMiniAppId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereMiniAppKey($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereWechatApiclientCert($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereWechatApiclientKey($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereWechatAppId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereWechatAppKey($value)
 * @method static \Illuminate\Database\Query\Builder|PayConfig withTrashed()
 * @method static \Illuminate\Database\Query\Builder|PayConfig withoutTrashed()
 *
 * @mixin \Eloquent
 *
 * @property int $setting_id 关联设置表
 *
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereSettingId($value)
 *
 * @property string|null $douyin_salt  抖音SALT
 * @property string|null $douyin_token 抖音TOKEN
 *
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereDouyinSalt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereDouyinToken($value)
 *
 * @property string      $kuaishou_app_id     快手_APP_ID
 * @property string|null $kuaishou_app_secret 快手_应用私钥
 * @property string|null $kuaishou_salt       快手SALT
 * @property string|null $kuaishou_token      快手TOKEN
 *
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereKuaishouAppId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereKuaishouAppSecret($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereKuaishouSalt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereKuaishouToken($value)
 *
 * @property string|null $wechat_mch_id  商户ID
 * @property string|null $wechat_mch_key 商户秘钥
 *
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereWecahtMchKey($value)
 * @method static \Illuminate\Database\Eloquent\Builder|PayConfig whereWechatMchId($value)
 */
class PayConfig extends Model
{
    use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'pay_config';

    public function setting()
    {
        return $this->belongsTo(Setting::class, 'setting_id', 'id');
    }
}
