from models import db


class AlbumStar(db.Model):
    id = db.Column(db.Integer, primary_key=True)

    album = db.relationship("Album")
    album_id = db.Column(db.Integer, db.ForeignKey("album.id"))

    user_id = db.Column(db.Integer, db.ForeignKey("user.id"))
    user = db.relationship("User")

    def __init__(self, user, album):
        self.user = user
        self.album = album