Add membership fee system with disability discount and fix document permissions

Features:
- Implement two fee types: entrance fee and annual fee (both NT$1,000)
- Add 50% discount for disability certificate holders
- Add disability certificate upload in member profile
- Integrate disability verification into cashier approval workflow
- Add membership fee settings in system admin

Document permissions:
- Fix hard-coded role logic in Document model
- Use permission-based authorization instead of role checks

Additional features:
- Add announcements, general ledger, and trial balance modules
- Add income management and accounting entries
- Add comprehensive test suite with factories
- Update UI translations to Traditional Chinese

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-01 09:56:01 +08:00
parent 83ce1f7fc8
commit 642b879dd4
207 changed files with 19487 additions and 3048 deletions

View File

@@ -0,0 +1,62 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('announcements', function (Blueprint $table) {
$table->id();
// 基本資訊
$table->string('title');
$table->text('content');
// 狀態管理
$table->enum('status', ['draft', 'published', 'archived'])->default('draft');
// 顯示控制
$table->boolean('is_pinned')->default(false);
$table->integer('display_order')->default(0);
// 訪問控制
$table->enum('access_level', ['public', 'members', 'board', 'admin'])->default('members');
// 時間控制
$table->timestamp('published_at')->nullable();
$table->timestamp('expires_at')->nullable();
$table->timestamp('archived_at')->nullable();
// 統計
$table->integer('view_count')->default(0);
// 用戶關聯
$table->foreignId('created_by_user_id')->constrained('users')->onDelete('cascade');
$table->foreignId('last_updated_by_user_id')->nullable()->constrained('users')->onDelete('set null');
$table->timestamps();
$table->softDeletes();
// 索引
$table->index('status');
$table->index('access_level');
$table->index('published_at');
$table->index('expires_at');
$table->index(['is_pinned', 'display_order']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('announcements');
}
};