Files
hyperf_service/app/Model/FinancesStatement.php
2025-03-21 17:41:10 +08:00

55 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\Database\Model\Builder;
use Hyperf\DbConnection\Model\Model;
/**
* @property int $id
* @property string $date
* @property int $cycle_id
* @property int $kitchen_id
* @property string $gross_sales
* @property string $discounts
* @property string $net_sales
* @property int $option_order_number
* @property int $option_copies
* @property int $meal_order_number
* @property int $meal_copies
* @property string $create_time
*/
class FinancesStatement extends Model
{
/**
* The table associated with the model.
*/
protected ?string $table = 'finances_statement';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = [];
protected array $guarded = [];
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['id' => 'integer', 'cycle_id' => 'integer', 'kitchen_id' => 'integer', 'option_order_nnumber' => 'integer', 'option_copies' => 'integer', 'meal_order_number' => 'integer', 'meal_copies' => 'integer'];
const string CREATED_AT = 'create_time';
const null UPDATED_AT = null;
/**
* @param int $cycleId
* @param int $kitchenId
* @return Builder|\Hyperf\Database\Model\Model|FinancesStatement|null
*/
public function getStatementByCycleIdAndKitchenId(int $cycleId,int $kitchenId): \Hyperf\Database\Model\Model|FinancesStatement|Builder|null
{
return $this->where('cycle_id',$cycleId)->where('kitchen_id',$kitchenId)->first();
}
}