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:
@@ -151,6 +151,9 @@ class ImportMembersCommand extends Command
|
||||
'payment_method' => MembershipPayment::METHOD_CASH,
|
||||
'status' => MembershipPayment::STATUS_APPROVED_CHAIR,
|
||||
'paid_at' => now(),
|
||||
'cashier_verified_at' => now(),
|
||||
'accountant_verified_at' => now(),
|
||||
'chair_verified_at' => now(),
|
||||
'notes' => 'Imported from legacy roster - pre-approved',
|
||||
]);
|
||||
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user