diff --git a/models/pastor.py b/models/pastor.py new file mode 100644 index 0000000..f578b3a --- /dev/null +++ b/models/pastor.py @@ -0,0 +1,23 @@ +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()) \ No newline at end of file