16 lines
460 B
Python
16 lines
460 B
Python
from sqlalchemy import Column, Integer, String
|
|
from sqlalchemy.orm import relationship
|
|
from sqlalchemy import ForeignKey
|
|
|
|
from database import Base
|
|
from .CustomBase import CustomBase
|
|
|
|
|
|
class Fcm(Base, CustomBase):
|
|
__tablename__ = "fcm"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
token = Column(String)
|
|
user_id = Column(Integer, ForeignKey("users.id"), nullable=False, index=True)
|
|
user = relationship("Users", back_populates="fcm")
|