v7.0.0 release
This commit is contained in:
1 parent
0e7fa04b03
commit
c4ea9a6cd1
3582 files changed
+626189
-160151
No files matched your search
@@ -8,7 +8,10 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* 레이아웃 확장 모델
|
||||
@@ -23,11 +26,13 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @property string $source_identifier 출처 식별자
|
||||
* @property string|null $override_target 오버라이드 대상
|
||||
* @property array $content 확장 정의 JSON
|
||||
* @property string|null $original_content_hash 원본 확장 콘텐츠 SHA-256 해시
|
||||
* @property int|null $original_content_size 원본 확장 콘텐츠 바이트 크기
|
||||
* @property int $priority 우선순위
|
||||
* @property bool $is_active 활성 상태
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Carbon|null $deleted_at
|
||||
* @property-read Template $template 템플릿 관계
|
||||
*/
|
||||
class LayoutExtension extends Model
|
||||
@@ -54,8 +59,11 @@ class LayoutExtension extends Model
|
||||
'source_identifier',
|
||||
'override_target',
|
||||
'content',
|
||||
'original_content_hash',
|
||||
'original_content_size',
|
||||
'priority',
|
||||
'is_active',
|
||||
'lock_version',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -71,24 +79,37 @@ class LayoutExtension extends Model
|
||||
'content' => 'array',
|
||||
'priority' => 'integer',
|
||||
'is_active' => 'boolean',
|
||||
'lock_version' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 템플릿 관계
|
||||
*
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function template(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Template::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 버전 이력 관계
|
||||
*/
|
||||
public function versions(): HasMany
|
||||
{
|
||||
return $this->hasMany(TemplateLayoutExtensionVersion::class, 'extension_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 최신 버전 관계
|
||||
*/
|
||||
public function latestVersion(): HasOne
|
||||
{
|
||||
return $this->hasOne(TemplateLayoutExtensionVersion::class, 'extension_id')
|
||||
->orderByDesc('version');
|
||||
}
|
||||
|
||||
/**
|
||||
* 활성 확장만 조회
|
||||
*
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeActive(Builder $query): Builder
|
||||
{
|
||||
@@ -97,9 +118,6 @@ class LayoutExtension extends Model
|
||||
|
||||
/**
|
||||
* Extension Point 타입만 조회
|
||||
*
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeExtensionPoints(Builder $query): Builder
|
||||
{
|
||||
@@ -108,9 +126,6 @@ class LayoutExtension extends Model
|
||||
|
||||
/**
|
||||
* Overlay 타입만 조회
|
||||
*
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeOverlays(Builder $query): Builder
|
||||
{
|
||||
@@ -119,11 +134,6 @@ class LayoutExtension extends Model
|
||||
|
||||
/**
|
||||
* 특정 출처의 확장만 조회
|
||||
*
|
||||
* @param Builder $query
|
||||
* @param LayoutSourceType $sourceType
|
||||
* @param string $identifier
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeBySource(Builder $query, LayoutSourceType $sourceType, string $identifier): Builder
|
||||
{
|
||||
@@ -133,9 +143,6 @@ class LayoutExtension extends Model
|
||||
|
||||
/**
|
||||
* 우선순위 순으로 정렬
|
||||
*
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeOrdered(Builder $query): Builder
|
||||
{
|
||||
@@ -145,9 +152,6 @@ class LayoutExtension extends Model
|
||||
|
||||
/**
|
||||
* 템플릿 오버라이드만 조회
|
||||
*
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeTemplateOverrides(Builder $query): Builder
|
||||
{
|
||||
@@ -157,9 +161,7 @@ class LayoutExtension extends Model
|
||||
/**
|
||||
* 특정 모듈/플러그인에 대한 템플릿 오버라이드 조회
|
||||
*
|
||||
* @param Builder $query
|
||||
* @param string $overrideTarget 오버라이드 대상 모듈/플러그인 식별자
|
||||
* @return Builder
|
||||
* @param string $overrideTarget 오버라이드 대상 모듈/플러그인 식별자
|
||||
*/
|
||||
public function scopeOverridingTarget(Builder $query, string $overrideTarget): Builder
|
||||
{
|
||||
@@ -168,9 +170,6 @@ class LayoutExtension extends Model
|
||||
|
||||
/**
|
||||
* 모듈 출처만 조회
|
||||
*
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeFromModules(Builder $query): Builder
|
||||
{
|
||||
@@ -179,9 +178,6 @@ class LayoutExtension extends Model
|
||||
|
||||
/**
|
||||
* 플러그인 출처만 조회
|
||||
*
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeFromPlugins(Builder $query): Builder
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user