Files
bsh_sample/app/common/model/Post.php
T
2025-12-15 18:30:24 +08:00

49 lines
1.0 KiB
PHP

<?php
namespace app\common\model;
use support\Model;
class Post extends Model
{
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'mysql';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'post';
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
protected $dateFormat = 'U';
/**
* 允许自动填充模型字段
*/
protected $fillable = ['id', 'user_id', 'category_id', 'sku_id', 'content', 'shop_name', 'location_name', 'latitude', 'longitude', 'status', 'sort', 'like', 'favorite', 'comment', 'is_free', 'model', 'browse', 'created_at', 'updated_at', 'price', 'age'];
/**
* 不允许自动填充模型字段
*/
protected $guarded = [];
}