Fixed unique_id issue in reservation table
This commit is contained in:
@@ -44,14 +44,13 @@ class Reservation(Base):
|
||||
__tablename__ = "reservations"
|
||||
id = Column(Integer, primary_key=True)
|
||||
customer_id = Column(Integer, ForeignKey("customers.id"))
|
||||
form_id = Column(String, unique=True)
|
||||
unique_id = Column(String(35), unique=True) # max length 35
|
||||
start_date = Column(Date)
|
||||
end_date = Column(Date)
|
||||
num_adults = Column(Integer)
|
||||
num_children = Column(Integer)
|
||||
children_ages = Column(String) # comma-separated
|
||||
offer = Column(String)
|
||||
utm_comment = Column(String)
|
||||
created_at = Column(DateTime)
|
||||
# Add all UTM fields and user comment for XML
|
||||
utm_source = Column(String)
|
||||
@@ -68,11 +67,11 @@ class Reservation(Base):
|
||||
customer = relationship("Customer", back_populates="reservations")
|
||||
|
||||
|
||||
class HashedCustomer(Base):
|
||||
__tablename__ = "hashed_customers"
|
||||
|
||||
# Table for tracking acknowledged requests by client
|
||||
class AckedRequest(Base):
|
||||
__tablename__ = 'acked_requests'
|
||||
id = Column(Integer, primary_key=True)
|
||||
customer_id = Column(Integer)
|
||||
hashed_email = Column(String)
|
||||
hashed_phone = Column(String)
|
||||
hashed_name = Column(String)
|
||||
redacted_at = Column(DateTime)
|
||||
client_id = Column(String, index=True)
|
||||
unique_id = Column(String, index=True) # Should match Reservation.form_id or another unique field
|
||||
timestamp = Column(DateTime)
|
||||
|
||||
Reference in New Issue
Block a user