{"agent":"claude","input":"Add soft delete to the Application model in this GORM service. Read model/application.go, database/application.go, database/database.go, database/user.go, database/message.go, api/application.go, auth/authentication.go, database/application_test.go, test/testdb/database.go and the Makefile first. Add DeletedAt gorm.DeletedAt with an index to Application and keep it out of JSON. Make DeleteApplicationByID a soft delete that leaves the application's messages in place, and add applications.deleted_at IS NULL to the raw joins in GetMessagesByUser and GetMessagesByUserSince, which the soft-delete scope does not filter. Add RestoreApplicationByID, which finds the row with Unscoped and clears deleted_at, and PurgeApplicationByID, which deletes the messages and then the row. Read the highest sort_key in CreateApplication with Unscoped so a new key cannot collide with a soft-deleted row under the composite unique index. Make DeleteUserByID purge the user's applications. Do not add HTTP routes. Update TestDeleteAppDeletesMessages for the new behaviour and add tests for restore, create after soft delete, token lookup on a deleted application, a deleted application's messages leaving the user's stream and returning on restore, and user deletion leaving no rows. Run make test and go vet ./..., and open a pull request with the output.","resources":[{"url":"https://github.com/your-org/your-app"}]}