Update membership types to match charter Article 7

- Add individual, sponsor, honorary_academic types (per charter)
- Keep legacy types (regular, honorary, lifetime, student) for compatibility
- Update labels to Chinese names
- Fix MembershipPayment import to include verification dates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-25 03:43:08 +08:00
parent 42099759e8
commit e27d3c0f72
4 changed files with 53 additions and 10 deletions

View File

@@ -16,11 +16,14 @@ class Member extends Model
const STATUS_EXPIRED = 'expired';
const STATUS_SUSPENDED = 'suspended';
// Membership type constants
const TYPE_REGULAR = 'regular';
const TYPE_HONORARY = 'honorary';
const TYPE_LIFETIME = 'lifetime';
const TYPE_STUDENT = 'student';
// Membership type constants (per charter Article 7)
const TYPE_INDIVIDUAL = 'individual'; // 個人會員
const TYPE_SPONSOR = 'sponsor'; // 贊助會員
const TYPE_HONORARY_ACADEMIC = 'honorary_academic'; // 榮譽學術會員
// Legacy types for backward compatibility
const TYPE_REGULAR = 'individual'; // Alias for individual
const TYPE_HONORARY = 'honorary_academic'; // Alias for honorary_academic
// Disability certificate status constants
const DISABILITY_STATUS_PENDING = 'pending';
@@ -216,10 +219,12 @@ class Member extends Model
public function getMembershipTypeLabelAttribute(): string
{
return match($this->membership_type) {
self::TYPE_REGULAR => '一般會員',
self::TYPE_HONORARY => '榮譽會員',
self::TYPE_LIFETIME => '終身會員',
self::TYPE_STUDENT => '學生會員',
'individual', 'regular' => '個人會員',
'sponsor' => '贊助會員',
'honorary_academic', 'honorary' => '榮譽學術會員',
// Legacy types
'lifetime' => '終身會員',
'student' => '學生會員',
default => $this->membership_type,
};
}