新增医生提现表-关联银行

This commit is contained in:
2023-10-30 17:12:46 +08:00
parent 202db1a621
commit a653149474
2 changed files with 89 additions and 0 deletions
+71
View File
@@ -0,0 +1,71 @@
<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\Snowflake\Concern\Snowflake;
/**
* @property int $withdrawal_bank_id 主键id
* @property int $withdrawal_id
* @property int $bank_id 银行id
* @property string $bank_card_code 银行卡号
* @property int $province_id 省份id
* @property string $province 省份
* @property int $city_id 城市id
* @property string $city 城市
* @property int $county_id 区县id
* @property string $county 区县
*/
class DoctorWithdrawalBank extends Model
{
use Snowflake;
/**
* The table associated with the model.
*/
protected ?string $table = 'doctor_withdrawal_bank';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['withdrawal_bank_id', 'withdrawal_id', 'bank_id', 'bank_card_code', 'province_id', 'province', 'city_id', 'city', 'county_id', 'county', 'created_at', 'updated_at'];
protected string $primaryKey = "withdrawal_bank_id";
/**
* 获取信息-单条
* @param array $params
* @param array $fields
* @return object|null
*/
public static function getOne(array $params, array $fields = ['*']): object|null
{
return self::where($params)->first($fields);
}
/**
* 获取信息-多条
* @param array $params
* @param array $fields
* @return object|null
*/
public static function getList(array $params, array $fields = ['*']): object|null
{
return self::where($params)->get($fields);
}
/**
* 新增
* @param array $data
* @return DoctorWithdrawalBank|\Hyperf\Database\Model\Model
*/
public static function addDoctorWithdrawalBank(array $data): \Hyperf\Database\Model\Model|DoctorWithdrawalBank
{
return self::create($data);
}
}