| 2 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace App\Models;
|
|
|
4 |
|
|
|
5 |
use Illuminate\Database\Eloquent\Model;
|
|
|
6 |
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
7 |
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
8 |
|
| 415 |
lars |
9 |
/**
|
|
|
10 |
* App\Models\Tool
|
|
|
11 |
*
|
|
|
12 |
* @property int $id
|
|
|
13 |
* @property int|null $module_id
|
|
|
14 |
* @property string $name
|
|
|
15 |
* @property string $button_name
|
|
|
16 |
* @property string $filename
|
|
|
17 |
* @property int|null $rang
|
|
|
18 |
* @property string $hidden
|
|
|
19 |
* @property-read \App\Models\Module|null $Module
|
|
|
20 |
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Property> $Property
|
|
|
21 |
* @property-read int|null $property_count
|
|
|
22 |
* @method static \Illuminate\Database\Eloquent\Builder|Tool newModelQuery()
|
|
|
23 |
* @method static \Illuminate\Database\Eloquent\Builder|Tool newQuery()
|
|
|
24 |
* @method static \Illuminate\Database\Eloquent\Builder|Tool query()
|
|
|
25 |
* @method static \Illuminate\Database\Eloquent\Builder|Tool whereButtonName($value)
|
|
|
26 |
* @method static \Illuminate\Database\Eloquent\Builder|Tool whereFilename($value)
|
|
|
27 |
* @method static \Illuminate\Database\Eloquent\Builder|Tool whereHidden($value)
|
|
|
28 |
* @method static \Illuminate\Database\Eloquent\Builder|Tool whereId($value)
|
|
|
29 |
* @method static \Illuminate\Database\Eloquent\Builder|Tool whereModuleId($value)
|
|
|
30 |
* @method static \Illuminate\Database\Eloquent\Builder|Tool whereName($value)
|
|
|
31 |
* @method static \Illuminate\Database\Eloquent\Builder|Tool whereRang($value)
|
|
|
32 |
* @mixin \Eloquent
|
|
|
33 |
*/
|
|
|
34 |
class Tool extends Model
|
| 2 |
lars |
35 |
{
|
|
|
36 |
protected $connection = "cms";
|
|
|
37 |
|
|
|
38 |
public function Property(): HasMany
|
|
|
39 |
{
|
|
|
40 |
return $this->hasMany( Property::class )->orderBy( "properties.rang" );
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
public function Module(): BelongsTo
|
|
|
44 |
{
|
|
|
45 |
return $this->belongsTo( Module::class )->orderBy( 'modules.rang' );
|
|
|
46 |
}
|
|
|
47 |
}
|