migration script

# Conflicts:
#	app/Filament/Resources/Torrent/AnnounceLogResource.php
This commit is contained in:
NekoCH
2025-09-21 18:07:38 +08:00
parent f0b50e4826
commit 532f3bdb3f
131 changed files with 2177 additions and 1644 deletions
@@ -2,8 +2,15 @@
namespace App\Filament\Resources\System\AgentAllowResource\RelationManagers;
use Filament\Schemas\Schema;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Tables\Columns\TextColumn;
use Filament\Actions\CreateAction;
use Filament\Actions\EditAction;
use Filament\Actions\DeleteAction;
use Filament\Actions\DeleteBulkAction;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Tables\Table;
use Filament\Tables;
@@ -16,14 +23,14 @@ class DeniesRelationManager extends RelationManager
protected static ?string $recordTitleAttribute = 'name';
public function form(Form $form): Form
public function form(Schema $schema): Schema
{
return $form
->schema([
Forms\Components\TextInput::make('name')->required()->maxLength(255)->label(__('label.name')),
Forms\Components\TextInput::make('peer_id')->required()->maxLength(255)->label(__('label.agent_deny.peer_id')),
Forms\Components\TextInput::make('agent')->required()->maxLength(255)->label(__('label.agent_deny.agent')),
Forms\Components\Textarea::make('comment')->label(__('label.comment')),
return $schema
->components([
TextInput::make('name')->required()->maxLength(255)->label(__('label.name')),
TextInput::make('peer_id')->required()->maxLength(255)->label(__('label.agent_deny.peer_id')),
TextInput::make('agent')->required()->maxLength(255)->label(__('label.agent_deny.agent')),
Textarea::make('comment')->label(__('label.comment')),
]);
}
@@ -31,22 +38,22 @@ class DeniesRelationManager extends RelationManager
{
return $table
->columns([
Tables\Columns\TextColumn::make('name')->label(__('label.name')),
Tables\Columns\TextColumn::make('peer_id')->label(__('label.agent_deny.peer_id')),
Tables\Columns\TextColumn::make('agent')->label(__('label.agent_deny.agent')),
TextColumn::make('name')->label(__('label.name')),
TextColumn::make('peer_id')->label(__('label.agent_deny.peer_id')),
TextColumn::make('agent')->label(__('label.agent_deny.agent')),
])
->filters([
//
])
->headerActions([
Tables\Actions\CreateAction::make(),
CreateAction::make(),
])
->actions([
Tables\Actions\EditAction::make(),
Tables\Actions\DeleteAction::make(),
->recordActions([
EditAction::make(),
DeleteAction::make(),
])
->bulkActions([
Tables\Actions\DeleteBulkAction::make(),
->toolbarActions([
DeleteBulkAction::make(),
]);
}
}