75 lines
2.7 KiB
PHP
75 lines
2.7 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Clusters\DailyOps\Resources\Photos\Schemas;
|
|
|
|
use Filament\Forms\Components\DateTimePicker;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\Textarea;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Toggle;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class PhotoForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
Select::make('event_id')
|
|
->relationship('event', 'name')
|
|
->required(),
|
|
Select::make('emotion_id')
|
|
->relationship('emotion', 'name'),
|
|
Select::make('task_id')
|
|
->relationship('task', 'title'),
|
|
TextInput::make('guest_name')
|
|
->required(),
|
|
TextInput::make('file_path')
|
|
->required(),
|
|
TextInput::make('thumbnail_path')
|
|
->required(),
|
|
TextInput::make('likes_count')
|
|
->required()
|
|
->numeric()
|
|
->default(0),
|
|
Toggle::make('is_featured')
|
|
->required(),
|
|
Textarea::make('metadata')
|
|
->columnSpanFull(),
|
|
TextInput::make('tenant_id')
|
|
->numeric(),
|
|
Select::make('media_asset_id')
|
|
->relationship('mediaAsset', 'id'),
|
|
TextInput::make('security_scan_status')
|
|
->required()
|
|
->default('pending'),
|
|
Textarea::make('security_scan_message')
|
|
->columnSpanFull(),
|
|
DateTimePicker::make('security_scanned_at'),
|
|
Textarea::make('security_meta')
|
|
->columnSpanFull(),
|
|
TextInput::make('ingest_source')
|
|
->required()
|
|
->default('guest_pwa'),
|
|
TextInput::make('filename'),
|
|
TextInput::make('original_name'),
|
|
TextInput::make('mime_type'),
|
|
TextInput::make('size')
|
|
->numeric(),
|
|
TextInput::make('width')
|
|
->numeric(),
|
|
TextInput::make('height')
|
|
->numeric(),
|
|
TextInput::make('status')
|
|
->required()
|
|
->default('pending'),
|
|
TextInput::make('uploader_id')
|
|
->numeric(),
|
|
TextInput::make('ip_address'),
|
|
Textarea::make('user_agent')
|
|
->columnSpanFull(),
|
|
TextInput::make('created_by_device_id'),
|
|
]);
|
|
}
|
|
}
|