mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
new selfhosted version
This commit is contained in:
16
shared_global/schema/shields/BotTrafficOptionSchema.ts
Normal file
16
shared_global/schema/shields/BotTrafficOptionSchema.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { model, Schema, Types } from 'mongoose';
|
||||
|
||||
export type TBotTrafficOptionSchema = {
|
||||
_id: Schema.Types.ObjectId,
|
||||
project_id: Schema.Types.ObjectId,
|
||||
block: boolean,
|
||||
created_at: Date
|
||||
}
|
||||
|
||||
const BotTrafficOptionSchema = new Schema<TBotTrafficOptionSchema>({
|
||||
project_id: { type: Types.ObjectId, index: 1 },
|
||||
block: { type: Boolean, required: true },
|
||||
created_at: { type: Date, default: () => Date.now() },
|
||||
});
|
||||
|
||||
export const BotTrafficOptionModel = model<TBotTrafficOptionSchema>('bot_traffic_options', BotTrafficOptionSchema);
|
||||
Reference in New Issue
Block a user