chore: 清除廢棄的 DB 表與 Model
- 新增 migration 刪除 coach_profiles、coach_member、plans、subscriptions 四張廢棄表 - 刪除對應的空殼 Model:CoachProfile、Plan、Subscription Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
// 該模型已棄用,請使用ProviderProfile模型
|
|
||||||
class CoachProfile extends Model
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 可以批量分配的屬性
|
|
||||||
*
|
|
||||||
* @var array<int, string>
|
|
||||||
*/
|
|
||||||
protected $fillable = [
|
|
||||||
'user_id',
|
|
||||||
'bio',
|
|
||||||
'expertise',
|
|
||||||
'certification',
|
|
||||||
'experience',
|
|
||||||
'rating',
|
|
||||||
'availability'
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 與用戶的關聯
|
|
||||||
*/
|
|
||||||
public function user()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(User::class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class Plan extends Model
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class Subscription extends Model
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('subscriptions');
|
||||||
|
Schema::dropIfExists('plans');
|
||||||
|
Schema::dropIfExists('coach_member');
|
||||||
|
Schema::dropIfExists('coach_profiles');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
// 這些表已確認廢棄,不提供還原
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user