feat: 인앱 업데이트 체크 API 구현
- app_versions 테이블 마이그레이션 (시스템 레벨, tenant_id 없음)
- AppVersion 모델 (SoftDeletes)
- AppVersionService: getLatestVersion, downloadApk
- AppVersionController: GET /api/v1/app/version, GET /api/v1/app/download/{id}
- ApiKeyMiddleware 화이트리스트에 api/v1/app/* 추가
- app_releases 스토리지 디스크 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
36
app/Models/AppVersion.php
Normal file
36
app/Models/AppVersion.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class AppVersion extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'version_code',
|
||||
'version_name',
|
||||
'platform',
|
||||
'release_notes',
|
||||
'apk_path',
|
||||
'apk_size',
|
||||
'apk_original_name',
|
||||
'force_update',
|
||||
'is_active',
|
||||
'download_count',
|
||||
'published_at',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'version_code' => 'integer',
|
||||
'apk_size' => 'integer',
|
||||
'force_update' => 'boolean',
|
||||
'is_active' => 'boolean',
|
||||
'download_count' => 'integer',
|
||||
'published_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user