diff --git a/src/adapters/localdb/models/deletedChat.js b/src/adapters/localdb/models/deletedChat.js new file mode 100644 index 0000000..fcbab11 --- /dev/null +++ b/src/adapters/localdb/models/deletedChat.js @@ -0,0 +1,16 @@ +/* + Database model for tracking deleted Nostr chat messages. +*/ + +import mongoose from 'mongoose' + +const DeletedChat = new mongoose.Schema({ + eventId: { type: String, required: true, default: null }, // Event ID of the deleted message. + npub: { type: String, default: null }, // Nostr public key of the user who created the message. + bchAddr: { type: String, default: null }, // bch address of the user who created the message. + pubkey: { type: String, default: null }, // Nostr public key of the user who created the message. + createdAt: { type: Date, default: Date.now }, + updatedAt: { type: Date, default: Date.now } +}) + +export default mongoose.model('deletedChat', DeletedChat) diff --git a/src/adapters/localdb/models/deletedPost.js b/src/adapters/localdb/models/deletedPost.js new file mode 100644 index 0000000..b9ae623 --- /dev/null +++ b/src/adapters/localdb/models/deletedPost.js @@ -0,0 +1,16 @@ +/* + Database model for tracking deleted Nostr posts. +*/ + +import mongoose from 'mongoose' + +const DeletedPost = new mongoose.Schema({ + eventId: { type: String, required: true, default: null }, // Event ID of the deleted post. + npub: { type: String, default: null }, // Nostr public key of the user who created the post. + bchAddr: { type: String, default: null }, // bch address of the user who created the post. + pubkey: { type: String, default: null }, // Nostr public key of the user who created the post. + createdAt: { type: Date, default: Date.now }, + updatedAt: { type: Date, default: Date.now } +}) + +export default mongoose.model('deletedPost', DeletedPost)