From 8891ae2653bf5ccc1f3718f352f8309493a68e76 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Wed, 26 Mar 2025 12:29:52 +0000 Subject: [PATCH] Add Pastor model --- models/pastor.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 models/pastor.py 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