mirror of
https://github.com/Permissionless-Software-Foundation/bch-dex.git
synced 2026-09-21 16:52:00 -07:00
fix(database): Adding deletedChat and deletedPost DB models
This commit is contained in:
@@ -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)
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user