diff --git a/data/database.py b/data/database.py index 49e1d607e..5534408d8 100644 --- a/data/database.py +++ b/data/database.py @@ -133,6 +133,18 @@ class RepositoryPermission(BaseModel): ) +class PermissionPrototype(BaseModel): + org = ForeignKeyField(User, index=True) + user = ForeignKeyField(User, index=True, null=True) + role = ForeignKeyField(Role) + + class Meta: + database = db + indexes = ( + (('org', 'user'), True), + ) + + class Webhook(BaseModel): public_id = CharField(default=random_string_generator(length=64), unique=True, index=True)