Add a permissiondefault data type.
This commit is contained in:
parent
d5bbea9fb2
commit
f612f5c290
1 changed files with 12 additions and 0 deletions
|
@ -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):
|
class Webhook(BaseModel):
|
||||||
public_id = CharField(default=random_string_generator(length=64),
|
public_id = CharField(default=random_string_generator(length=64),
|
||||||
unique=True, index=True)
|
unique=True, index=True)
|
||||||
|
|
Reference in a new issue