12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\HasMany;
- /**
- * 标签.
- *
- * @property int $id
- * @property string $name 名称
- * @property int $sort 排序值
- * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Node[] $nodes
- * @property-read int|null $nodes_count
- * @method static \Illuminate\Database\Eloquent\Builder|Label newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|Label newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|Label query()
- * @method static \Illuminate\Database\Eloquent\Builder|Label whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Label whereName($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Label whereSort($value)
- * @mixin \Eloquent
- */
- class Label extends Model
- {
- public $timestamps = false;
- protected $table = 'label';
- protected $guarded = [];
- public function nodes()
- {
- return $this->belongsToMany(Node::class);
- }
- }
|