fix:category

This commit is contained in:
LAPTOP-7SGDREK0\shiweijun
2025-01-09 16:42:10 +08:00
parent 051d19f79f
commit 09d9bfaf7e
5 changed files with 140 additions and 7 deletions

37
app/Model/Category.php Normal file
View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\DbConnection\Model\Model;
/**
* @property int $id
* @property string $name
* @property int $image_id
* @property string $create_time
* @property string $update_time
*/
class Category extends Model
{
/**
* The table associated with the model.
*/
protected ?string $table = 'category';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = [];
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['id' => 'integer', 'image_id' => 'integer'];
const string CREATED_AT = 'create_time';
const string UPDATED_AT = 'update_time';
}