26 lines
716 B
Python
26 lines
716 B
Python
from sqlalchemy import Column, String, Text, DateTime
|
|
from sqlalchemy.dialects.postgresql import UUID
|
|
from sqlalchemy.sql import func
|
|
from core.database import Base
|
|
import uuid
|
|
|
|
class ContactForm(Base):
|
|
__tablename__ = "contact_forms"
|
|
|
|
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
|
name = Column(String, nullable=False)
|
|
email = Column(String, nullable=False)
|
|
message = Column(Text, nullable=False)
|
|
created_at = Column(
|
|
"created_at",
|
|
DateTime,
|
|
nullable=False,
|
|
default=func.now(),
|
|
)
|
|
updated_at = Column(
|
|
"updated_at",
|
|
DateTime,
|
|
nullable=False,
|
|
default=func.now(),
|
|
onupdate=func.now(),
|
|
) |