. */ declare(strict_types=1); namespace FireflyIII\Models; use FireflyIII\User; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsToMany; /** * Class Role. * * @property int $id * @property string $name * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @property string|null $display_name * @property string|null $description * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\User[] $users * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\Models\Role newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\Models\Role newQuery() * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\Models\Role query() * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\Models\Role whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\Models\Role whereDescription($value) * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\Models\Role whereDisplayName($value) * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\Models\Role whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\Models\Role whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\Models\Role whereUpdatedAt($value) * @mixin \Eloquent */ class Role extends Model { /** * The attributes that should be casted to native types. * * @var array */ protected $casts = [ 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; /** @var array Fields that can be filled */ protected $fillable = ['name', 'display_name', 'description']; /** * @codeCoverageIgnore * @return BelongsToMany */ public function users(): BelongsToMany { return $this->belongsToMany(User::class); } }