Gregniuki commited on
Commit
9334ecd
1 Parent(s): 40adb37

Update models.py

Browse files
Files changed (1) hide show
  1. models.py +4 -3
models.py CHANGED
@@ -1,6 +1,6 @@
1
  # models.py
2
 
3
- from sqlalchemy import Column, Integer, String, DateTime, ForeignKey, Boolean, ARRAY
4
  from sqlalchemy.orm import relationship
5
  from sqlalchemy.sql import func
6
  from base import Base
@@ -14,11 +14,12 @@ class User(Base):
14
  hashed_password = Column(String)
15
  is_verified = Column(Boolean, default=False)
16
  credits = Column(Integer, default=10000)
17
- selected_tts_models = Column(ARRAY(String), default=['default.onnx']) # Set the default value to 'default.onnx'
18
 
19
  # Define other user fields as needed
20
  # Add the relationship with VerificationToken
21
  verification_tokens = relationship("VerificationToken", back_populates="user")
 
22
  # Define other database models as needed
23
  class VerificationToken(Base):
24
  __tablename__ = "verification_tokens"
@@ -29,4 +30,4 @@ class VerificationToken(Base):
29
  created_at = Column(DateTime(timezone=True), server_default=func.now())
30
 
31
  # Define a relationship with the User model
32
- user = relationship("User", back_populates="verification_tokens")
 
1
  # models.py
2
 
3
+ from sqlalchemy import Column, Integer, String, DateTime, ForeignKey, Boolean
4
  from sqlalchemy.orm import relationship
5
  from sqlalchemy.sql import func
6
  from base import Base
 
14
  hashed_password = Column(String)
15
  is_verified = Column(Boolean, default=False)
16
  credits = Column(Integer, default=10000)
17
+ selected_tts_models = Column(String, default='default.onnx') # Store as a string
18
 
19
  # Define other user fields as needed
20
  # Add the relationship with VerificationToken
21
  verification_tokens = relationship("VerificationToken", back_populates="user")
22
+
23
  # Define other database models as needed
24
  class VerificationToken(Base):
25
  __tablename__ = "verification_tokens"
 
30
  created_at = Column(DateTime(timezone=True), server_default=func.now())
31
 
32
  # Define a relationship with the User model
33
+ user = relationship("User", back_populates="verification_tokens")