23 lines
931 B
Python
23 lines
931 B
Python
from sqlalchemy import Column, String, Integer, Boolean, DateTime, Text
|
|
from sqlalchemy.sql import func
|
|
from core.database import Base
|
|
import uuid
|
|
|
|
class Pastor(Base):
|
|
__tablename__ = "pastors"
|
|
|
|
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
|
|
name = Column(String, nullable=False, index=True)
|
|
church_name = Column(String, nullable=False)
|
|
location = Column(String, nullable=False)
|
|
age = Column(Integer, nullable=False)
|
|
bio = Column(Text, nullable=True)
|
|
website = Column(String, nullable=True)
|
|
social_media = Column(String, nullable=True)
|
|
specialty = Column(String, nullable=True)
|
|
years_in_ministry = Column(Integer, nullable=True)
|
|
followers_count = Column(Integer, default=0)
|
|
is_active = Column(Boolean, default=True)
|
|
|
|
created_at = Column(DateTime, default=func.now())
|
|
updated_at = Column(DateTime, default=func.now(), onupdate=func.now()) |