12 lines
No EOL
341 B
Python
12 lines
No EOL
341 B
Python
from sqlalchemy import Integer
|
|
from sqlalchemy import String
|
|
from sqlalchemy import Column
|
|
from sqlalchemy.ext.declarative import declarative_base
|
|
|
|
Base = declarative_base()
|
|
|
|
class Subscription(Base):
|
|
__tablename__ = "newsletter"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
email = Column(String, index=True, unique=True) |