declare UploadEvent model before using as relation