38728-vm/core/models.py
Flatlogic Bot 012eaee40e One_Test
2026-02-24 00:57:30 +00:00

27 lines
860 B
Python

from django.db import models
class Member(models.Model):
ROLE_CHOICES = [
('STAFF', 'Staff'),
('BOARD', 'Board Member'),
('YOUTH_VOLUNTEER', 'Youth Volunteer'),
]
STATUS_CHOICES = [
('ACTIVE', 'Active'),
('INACTIVE', 'Inactive'),
]
full_name = models.CharField(max_length=255)
email = models.EmailField(unique=True)
phone = models.CharField(max_length=20, blank=True, null=True)
role = models.CharField(max_length=20, choices=ROLE_CHOICES, default='STAFF')
status = models.CharField(max_length=10, choices=STATUS_CHOICES, default='ACTIVE')
join_date = models.DateField(auto_now_add=True)
notes = models.TextField(blank=True, null=True)
def __str__(self):
return f"{self.full_name} ({self.get_role_display()})"
class Meta:
ordering = ['-join_date']