diff --git a/calsocial/models.py b/calsocial/models.py index 63c8d5e..a512dfe 100644 --- a/calsocial/models.py +++ b/calsocial/models.py @@ -149,6 +149,27 @@ class Role(db.Model, RoleMixin): return f'' +class Profile(db.Model): # pylint: disable=too-few-public-methods + """Database model for user profiles + """ + + __tablename__ = 'profiles' + # pylint: disable=invalid-name + id = db.Column(db.Integer(), primary_key=True) + + #: The ID of the local user this profile belongs to + user_id = db.Column(db.Integer(), db.ForeignKey('users.id'), nullable=True) + + #: The username this profile belongs to. If ``None``, `user_id` must be set + username = db.Column(db.String(length=50), nullable=True) + + #: The domain this profile originates from. If ``None``, `user_id` must be set + domain = db.Column(db.Unicode(length=100), nullable=True) + + #: The display name + display_name = db.Column(db.Unicode(length=80), nullable=False) + + class Event(db.Model): """Database model for events """