1
This commit is contained in:
@@ -6,7 +6,6 @@ namespace App\Model;
|
||||
|
||||
|
||||
|
||||
use Hyperf\Database\Model\Model;
|
||||
use Hyperf\Snowflake\Concern\Snowflake;
|
||||
|
||||
/**
|
||||
@@ -34,11 +33,6 @@ class DoctorAccountDay extends Model
|
||||
*/
|
||||
protected array $fillable = ['account_detail_id', 'doctor_id', 'year', 'month', 'day', 'date', 'total_amount', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['account_detail_id' => 'integer', 'doctor_id' => 'integer', 'year' => 'integer', 'month' => 'integer', 'day' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
|
||||
|
||||
protected string $primaryKey = "account_detail_id";
|
||||
|
||||
/**
|
||||
@@ -73,16 +67,19 @@ class DoctorAccountDay extends Model
|
||||
return self::where($params)->sum("total_amount");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param array $data
|
||||
* @return Model|DoctorAccountDay
|
||||
* @return DoctorAccountDay|\Hyperf\Database\Model\Model
|
||||
*/
|
||||
public static function addDoctorAccountDay(array $data): \Hyperf\Database\Model\Model|DoctorAccountDay
|
||||
public static function addDoctorAccountDay(array $data): DoctorAccountDay|\Hyperf\Database\Model\Model
|
||||
{
|
||||
return self::create($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 自增
|
||||
* @param array $params
|
||||
|
||||
Reference in New Issue
Block a user