Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/datastore/applicationstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ func (s *applicationStore) DisableApplication(ctx context.Context, id string) er

func (s *applicationStore) DeleteApplication(ctx context.Context, id string) error {
return s.ds.Update(ctx, applicationModelKind, id, applicationFactory, func(e interface{}) error {
now := s.nowFunc().Unix()
app := e.(*model.Application)
app.Deleted = true
app.Disabled = true
app.UpdatedAt = s.nowFunc().Unix()
app.DeletedAt = now
app.UpdatedAt = now
return nil
})
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/model/application.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ message Application {
// Current sync state.
ApplicationSyncState sync_state = 13;

// Unix time when the application was deleted.
int64 deleted_at = 98 [(validate.rules).int64.gte = 0];
// Whether the application is deleted or not.
bool deleted = 99;
// Whether the application is disabled or not.
Expand Down