- Add data classes for notifications
- Add basic API for notifications - Change the password required to be a notification
This commit is contained in:
parent
e650da5278
commit
368a8da7db
7 changed files with 80 additions and 6 deletions
|
@ -271,9 +271,22 @@ class LogEntry(BaseModel):
|
|||
metadata_json = TextField(default='{}')
|
||||
|
||||
|
||||
class NotificationKind(BaseModel):
|
||||
name = CharField(index=True)
|
||||
|
||||
|
||||
class Notification(BaseModel):
|
||||
uuid = CharField(default=uuid_generator, index=True)
|
||||
kind = ForeignKeyField(NotificationKind, index=True)
|
||||
notification_user = ForeignKeyField(User, index=True)
|
||||
metadata_json = TextField(default='{}')
|
||||
created = DateTimeField(default=datetime.now, index=True)
|
||||
|
||||
|
||||
all_models = [User, Repository, Image, AccessToken, Role,
|
||||
RepositoryPermission, Visibility, RepositoryTag,
|
||||
EmailConfirmation, FederatedLogin, LoginService, QueueItem,
|
||||
RepositoryBuild, Team, TeamMember, TeamRole, Webhook,
|
||||
LogEntryKind, LogEntry, PermissionPrototype, ImageStorage,
|
||||
BuildTriggerService, RepositoryBuildTrigger]
|
||||
BuildTriggerService, RepositoryBuildTrigger, NotificationKind,
|
||||
Notification]
|
||||
|
|
Reference in a new issue