Files
hyperf_service/app/Model/MaterialApplication.php
LAPTOP-7SGDREK0\shiweijun 33595961d8 feat:material_application
2025-02-07 15:29:56 +08:00

51 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\Database\Model\Builder;
use Hyperf\DbConnection\Model\Model;
/**
* @property int $id
* @property int $material_id
* @property int $dish_id
* @property string $number
* @property string $al_number
* @property string $processing
* @property int $status
* @property int $city_id
* @property int $kitchen_id
* @property int $operator_id
* @property int $is_del
* @property string $create_time
* @property string $update_time
*/
class MaterialApplication extends Model
{
/**
* The table associated with the model.
*/
protected ?string $table = 'material_application';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = [];
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['id' => 'integer', 'material_id' => 'integer', 'dish_id' => 'integer', 'status' => 'integer', 'city_id' => 'integer', 'kitchen_id' => 'integer', 'operator_id' => 'integer', 'is_del' => 'integer'];
const CREATED_AT = 'create_time';
const UPDATED_AT = 'update_time';
public function getInfoById(int $id): \Hyperf\Database\Model\Model|Builder|null
{
return $this->where('id', $id)->first();
}
}