import Models
from app import db


class PrivacySettingsModel(Models.Base):
    __tablename__ = 'privacy_settings'

    user_id = db.Column(db.ForeignKey('user.id'), primary_key=True)
    user = db.relationship(
        "UserModel",
        back_populates="privacy_settings"
    )
    show_profile_picture = db.Column(db.Boolean, nullable=False, default=False)
    show_matriculation_date = db.Column(db.Boolean, nullable=False, default=False)
    show_project_groups = db.Column(db.Boolean, nullable=False, default=False)
    show_email = db.Column(db.Boolean, nullable=False, default=False)
    show_course_of_study = db.Column(db.Boolean, nullable=False, default=False)
    show_description = db.Column(db.Boolean, nullable=False, default=False)
    show_matching_preferences = db.Column(db.Boolean, nullable=False, default=False)
    accept_direct_messages = db.Column(db.Boolean, nullable=False, default=False)
    show_rank = db.Column(db.Boolean, nullable=False, default=True)
