Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions app/Models/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Server> $additional_servers
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\StandaloneDocker> $additional_networks
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ScheduledTask> $scheduled_tasks
* @property-read array<int, string> $ports_exposes_array Computed attribute from ports_exposes
* @property-read array<int, string> $ports_mappings_array Computed attribute from ports_mappings
* @property-read array<int, string> $fqdns Computed attribute from fqdn
* @property-read array<int, string> $custom_network_aliases_array Computed attribute from custom_network_aliases
* @property-read string|null $git_branch_location Computed Git branch location
* @property-read string|null $git_webhook Computed Git webhook URL
* @property-read string|null $git_commits Git commits URL
* @property-read bool $server_status Server health status
* @property string|null $watch_paths Normalized watch paths (newline-separated)
* @property string $status Application status
* @property string|null $image Docker image (via docker_registry_image_name)
* @property int|null $pull_request_id Pull request ID for preview deployments
* @property bool $is_container_label_readonly_enabled Container label readonly setting
* @property string|null $custom_docker_run_options Custom Docker run options
* @property string|null $custom_labels Custom labels for the container
*/
class Application extends BaseModel
{
Expand Down
6 changes: 6 additions & 0 deletions app/Models/ApplicationDeploymentQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
use Illuminate\Support\Facades\DB;
use OpenApi\Attributes as OA;

/**
* @property-read \App\Models\Server|null $server Computed from server_id
* @property-read \App\Models\Application $application
* @property int|null $server_id Server ID for deployment
* @property int $pull_request_id Pull request ID (0 for main deployment)
*/
#[OA\Schema(
description: 'Project model',
type: 'object',
Expand Down
8 changes: 8 additions & 0 deletions app/Models/ApplicationPreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
use Spatie\Url\Url;
use Visus\Cuid2\Cuid2;

/**
* @property Application $application
* @property int $pull_request_id
* @property string|null $fqdn
* @property string|null $status
* @property string|null $docker_compose_domains
* @property \Illuminate\Database\Eloquent\Collection<int, LocalPersistentVolume> $persistentStorages
*/
class ApplicationPreview extends BaseModel
{
use SoftDeletes;
Expand Down
18 changes: 18 additions & 0 deletions app/Models/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@
'description' => ['type' => 'string'],
]
)]
/**
* @property int $id
* @property string $uuid
* @property string $name
* @property int $project_id
* @property Project $project
* @property \Illuminate\Database\Eloquent\Collection<int, SharedEnvironmentVariable> $environment_variables
* @property \Illuminate\Database\Eloquent\Collection<int, Application> $applications
* @property \Illuminate\Database\Eloquent\Collection<int, StandalonePostgresql> $postgresqls
* @property \Illuminate\Database\Eloquent\Collection<int, StandaloneRedis> $redis
* @property \Illuminate\Database\Eloquent\Collection<int, StandaloneMongodb> $mongodbs
* @property \Illuminate\Database\Eloquent\Collection<int, StandaloneMysql> $mysqls
* @property \Illuminate\Database\Eloquent\Collection<int, StandaloneMariadb> $mariadbs
* @property \Illuminate\Database\Eloquent\Collection<int, StandaloneKeydb> $keydbs
* @property \Illuminate\Database\Eloquent\Collection<int, StandaloneDragonfly> $dragonflies
* @property \Illuminate\Database\Eloquent\Collection<int, StandaloneClickhouse> $clickhouses
* @property \Illuminate\Database\Eloquent\Collection<int, Service> $services
*/
class Environment extends BaseModel
{
use ClearsGlobalSearchCache;
Expand Down
20 changes: 20 additions & 0 deletions app/Models/EnvironmentVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@
'updated_at' => ['type' => 'string'],
]
)]
/**
* @property int $id
* @property string $uuid
* @property string $key
* @property string|null $value
* @property string|null $real_value
* @property bool $is_literal
* @property bool $is_multiline
* @property bool $is_preview
* @property bool $is_runtime
* @property bool $is_buildtime
* @property bool $is_shared
* @property bool $is_shown_once
* @property bool $is_required
* @property string|null $version
* @property string $resourceable_type
* @property int $resourceable_id
* @property Application|Service|StandalonePostgresql|StandaloneRedis|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|null $resourceable
* @property Service|null $service
*/
class EnvironmentVariable extends BaseModel
{
protected $guarded = [];
Expand Down
4 changes: 4 additions & 0 deletions app/Models/LocalFileVolume.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Symfony\Component\Yaml\Yaml;

/**
* @property Application|Service|ServiceApplication|ServiceDatabase $resource
* @property-read Service|null $service
*/
class LocalFileVolume extends BaseModel
{
protected $casts = [
Expand Down
7 changes: 7 additions & 0 deletions app/Models/LocalPersistentVolume.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
use Illuminate\Database\Eloquent\Model;
use Symfony\Component\Yaml\Yaml;

/**
* @property int $id
* @property string $name
* @property string $mount_path
* @property string|null $host_path
* @property Application|Service|ServiceApplication|ServiceDatabase|StandalonePostgresql|StandaloneRedis|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|StandaloneDragonfly|StandaloneClickhouse|null $resource
*/
class LocalPersistentVolume extends Model
{
protected $guarded = [];
Expand Down
25 changes: 24 additions & 1 deletion app/Models/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,30 @@
use Illuminate\Database\Eloquent\Model;

/**
* @property-read WhiteLabelConfig|null $whiteLabelConfig
* @property int $id
* @property string $uuid
* @property string $name
* @property string|null $slug
* @property bool $whitelabel_public_access
* @property string|null $hierarchy_type
* @property int|null $hierarchy_level
* @property int|null $parent_organization_id
* @property array|null $branding_config
* @property array|null $feature_flags
* @property bool $is_active
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Models\Organization|null $parent
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Organization> $children
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
* @property-read \App\Models\EnterpriseLicense|null $activeLicense
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\EnterpriseLicense> $licenses
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Server> $servers
* @property-read \App\Models\WhiteLabelConfig|null $whiteLabelConfig
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CloudProviderCredential> $cloudProviderCredentials
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TerraformDeployment> $terraformDeployments
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Application> $applications
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Domain> $domains
*/
class Organization extends Model
{
Expand Down
16 changes: 16 additions & 0 deletions app/Models/PrivateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@
'updated_at' => ['type' => 'string'],
],
)]
/**
* @property int $id
* @property string $uuid
* @property string $name
* @property string|null $description
* @property string $private_key
* @property string $public_key
* @property string|null $fingerprint
* @property bool $is_git_related
* @property int $team_id
* @property Team $team
* @property \Illuminate\Database\Eloquent\Collection<int, Server> $servers
* @property \Illuminate\Database\Eloquent\Collection<int, GithubApp> $githubApps
* @property \Illuminate\Database\Eloquent\Collection<int, GitlabApp> $gitlabApps
* @property \Illuminate\Database\Eloquent\Collection<int, Application> $applications
*/
class PrivateKey extends BaseModel
{
use HasSafeStringAttribute, WithRateLimiting;
Expand Down
13 changes: 13 additions & 0 deletions app/Models/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@
),
]
)]
/**
* @property int $id
* @property string $uuid
* @property string $name
* @property string|null $description
* @property int $team_id
* @property \Illuminate\Database\Eloquent\Collection<int, Environment> $environments
* @property \Illuminate\Database\Eloquent\Collection<int, SharedEnvironmentVariable> $environment_variables
* @property ProjectSetting|null $settings
* @property Team $team
* @property \Illuminate\Database\Eloquent\Collection<int, Service> $services
* @property \Illuminate\Database\Eloquent\Collection<int, Application> $applications
*/
class Project extends BaseModel
{
use ClearsGlobalSearchCache;
Expand Down
17 changes: 17 additions & 0 deletions app/Models/ScheduledTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;

/**
* @property int $id
* @property string $uuid
* @property string $name
* @property string $frequency
* @property string $command
* @property bool $enabled
* @property int|null $timeout
* @property int|null $application_id
* @property int|null $service_id
* @property int|null $database_id
* @property Application|null $application
* @property Service|null $service
* @property StandalonePostgresql|StandaloneRedis|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|null $database
* @property ScheduledTaskExecution|null $latest_log
* @property \Illuminate\Database\Eloquent\Collection<int, ScheduledTaskExecution> $executions
*/
class ScheduledTask extends BaseModel
{
use HasSafeStringAttribute;
Expand Down
4 changes: 4 additions & 0 deletions app/Models/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
* @property \App\Models\CloudProviderToken|null $cloudProviderToken
* @property \Illuminate\Database\Eloquent\Collection<int, \App\Models\SslCertificate> $sslCertificates
* @property \Illuminate\Database\Eloquent\Collection<int, \App\Models\Service> $services
* @property-read string $getIp Computed IP address (localhost returns base_ip in dev)
* @property int $port Server SSH port
* @property string $user Server SSH user
* @property string $ip Server IP address
*/
#[OA\Schema(
description: 'Server model',
Expand Down
30 changes: 30 additions & 0 deletions app/Models/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,36 @@
use Spatie\Url\Url;
use Visus\Cuid2\Cuid2;

/**
* @property int $id
* @property string $uuid
* @property string $name
* @property string|null $description
* @property int $environment_id
* @property int $server_id
* @property string|null $docker_compose_raw
* @property string|null $docker_compose
* @property string|null $destination_type
* @property int|null $destination_id
* @property bool $connect_to_docker_network
* @property bool $is_container_label_escape_enabled
* @property bool $is_container_label_readonly_enabled
* @property string|null $config_hash
* @property string|null $service_type
* @property string|null $compose_parsing_version
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property-read \App\Models\Server $server
* @property-read \App\Models\Environment $environment
* @property-read \App\Models\StandaloneDocker|\App\Models\SwarmDocker|null $destination
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ServiceApplication> $applications
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ServiceDatabase> $databases
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\EnvironmentVariable> $environment_variables
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ScheduledTask> $scheduled_tasks
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\LocalPersistentVolume> $persistentStorages
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\LocalFileVolume> $fileStorages
*/
#[OA\Schema(
description: 'Service model',
type: 'object',
Expand Down
11 changes: 11 additions & 0 deletions app/Models/SharedEnvironmentVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@

use Illuminate\Database\Eloquent\Model;

/**
* @property int $id
* @property string $key
* @property string|null $value
* @property int|null $team_id
* @property int|null $project_id
* @property int|null $environment_id
* @property Team|null $team
* @property Project|null $project
* @property Environment|null $environment
*/
class SharedEnvironmentVariable extends Model
{
protected $guarded = [];
Expand Down
12 changes: 12 additions & 0 deletions app/Models/StandaloneClickhouse.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
* @property-read \App\Models\Environment $environment
* @property-read \App\Models\StandaloneDocker|\App\Models\SwarmDocker $destination
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\LocalPersistentVolume> $persistentStorages
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\EnvironmentVariable> $runtime_environment_variables
* @property-read string $internal_db_url
* @property-read string $external_db_url
* @property-read string $database_type
* @property string|null $clickhouse_db ClickHouse database name
* @property-read array<int, string> $ports_mappings_array Computed array from ports_mappings
* @property-read bool $server_status Server functional status
*/
class StandaloneClickhouse extends BaseModel
{
use ClearsGlobalSearchCache, HasFactory, HasSafeStringAttribute, SoftDeletes;
Expand Down
18 changes: 18 additions & 0 deletions app/Models/StandaloneDocker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@

use App\Traits\HasSafeStringAttribute;

/**
* @property int $id
* @property int $server_id
* @property string $network
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Models\Server $server
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Application> $applications
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\StandalonePostgresql> $postgresqls
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\StandaloneRedis> $redis
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\StandaloneMongodb> $mongodbs
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\StandaloneMysql> $mysqls
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\StandaloneMariadb> $mariadbs
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\StandaloneKeydb> $keydbs
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\StandaloneDragonfly> $dragonflies
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\StandaloneClickhouse> $clickhouses
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Service> $services
*/
class StandaloneDocker extends BaseModel
{
use HasSafeStringAttribute;
Expand Down
11 changes: 11 additions & 0 deletions app/Models/StandaloneDragonfly.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
* @property-read \App\Models\Environment $environment
* @property-read \App\Models\StandaloneDocker|\App\Models\SwarmDocker $destination
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\LocalPersistentVolume> $persistentStorages
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\EnvironmentVariable> $runtime_environment_variables
* @property-read string $internal_db_url
* @property-read string $external_db_url
* @property-read string $database_type
* @property string|null $ssl_mode SSL mode for connection
* @property-read bool $server_status Server functional status
*/
class StandaloneDragonfly extends BaseModel
{
use ClearsGlobalSearchCache, HasFactory, HasSafeStringAttribute, SoftDeletes;
Expand Down
10 changes: 10 additions & 0 deletions app/Models/StandaloneKeydb.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
* @property-read \App\Models\Environment $environment
* @property-read \App\Models\StandaloneDocker|\App\Models\SwarmDocker $destination
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\LocalPersistentVolume> $persistentStorages
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\EnvironmentVariable> $runtime_environment_variables
* @property-read string $internal_db_url
* @property-read string|null $external_db_url
* @property string|null $ssl_mode SSL mode for connection
* @property-read bool $server_status Server functional status
*/
class StandaloneKeydb extends BaseModel
{
use ClearsGlobalSearchCache, HasFactory, HasSafeStringAttribute, SoftDeletes;
Expand Down
11 changes: 10 additions & 1 deletion app/Models/StandaloneMariadb.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@
use App\Traits\HasSafeStringAttribute;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
* @property-read \App\Models\Environment $environment
* @property-read \App\Models\StandaloneDocker|\App\Models\SwarmDocker $destination
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\LocalPersistentVolume> $persistentStorages
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\EnvironmentVariable> $runtime_environment_variables
* @property-read string $internal_db_url
* @property-read string|null $external_db_url
* @property-read string $database_type
* @property-read bool $server_status Server functional status
*/
class StandaloneMariadb extends BaseModel
{
use ClearsGlobalSearchCache, HasFactory, HasSafeStringAttribute, SoftDeletes;
Expand Down
Loading