justinarat / Teamify

0 stars 0 forks source link

Tracking user actions #4

Closed dominictdavies closed 1 month ago

dominictdavies commented 2 months ago

Need to keep track of user action history that per user on the site.

Tasks:

FAljanobi commented 2 months ago

making account create lobby join lobby type in lobby change email change username change password delete account log in log out

FAljanobi commented 2 months ago

adding tracker table which has id,datetime,userid,action,desc

FAljanobi commented 2 months ago
class UserTracker(db.Model):
    __tablename__ = 'UserTracker' 
    RowID = db.Column(db.Text(), primary_key=True, unique=True, nullable=False)
    LobbyID = db.Column(db.Text(), db.ForeignKey("Lobby.LobbyID"), nullable=False)
    UserID = db.Column(db.Text(), db.ForeignKey("Users.UID"), nullable=False)
    Action = db.Column(db.Text(), nullable=False)
    Desc = db.Column(db.Text())
    userRel = db.relationship('Users', backref='users2', lazy=True)
    lobbyRel = db.relationship('Lobby', backref='lobby4', lazy=True)
FAljanobi commented 1 month ago

user tracking on the db side is set up all we have to do is write the code to implement it

dominictdavies commented 1 month ago

This is done.