mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
shields update
This commit is contained in:
18
shared_global/schema/shields/AddressBlacklistSchema.ts
Normal file
18
shared_global/schema/shields/AddressBlacklistSchema.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { model, Schema, Types } from 'mongoose';
|
||||
|
||||
export type TAddressBlacklistSchema = {
|
||||
_id: Schema.Types.ObjectId,
|
||||
project_id: Schema.Types.ObjectId,
|
||||
address: string,
|
||||
description: string,
|
||||
created_at: Date
|
||||
}
|
||||
|
||||
const AddressBlacklistSchema = new Schema<TAddressBlacklistSchema>({
|
||||
project_id: { type: Types.ObjectId, index: 1 },
|
||||
address: { type: String, required: true },
|
||||
description: { type: String },
|
||||
created_at: { type: Date, default: () => Date.now() },
|
||||
});
|
||||
|
||||
export const AddressBlacklistModel = model<TAddressBlacklistSchema>('address_blacklists', AddressBlacklistSchema);
|
||||
Reference in New Issue
Block a user