mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
update shields
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);
|
||||
18
shared_global/schema/shields/CountryBlacklistSchema.ts
Normal file
18
shared_global/schema/shields/CountryBlacklistSchema.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { model, Schema, Types } from 'mongoose';
|
||||
|
||||
export type TCountryBlacklistSchema = {
|
||||
_id: Schema.Types.ObjectId,
|
||||
project_id: Schema.Types.ObjectId,
|
||||
country: string,
|
||||
description: string,
|
||||
created_at: Date
|
||||
}
|
||||
|
||||
const CountryBlacklistSchema = new Schema<TCountryBlacklistSchema>({
|
||||
project_id: { type: Types.ObjectId, index: 1 },
|
||||
country: { type: String, required: true },
|
||||
description: { type: String },
|
||||
created_at: { type: Date, default: () => Date.now() },
|
||||
});
|
||||
|
||||
export const CountryBlacklistModel = model<TCountryBlacklistSchema>('country_blacklists', CountryBlacklistSchema);
|
||||
18
shared_global/schema/shields/PageBlacklistSchema.ts
Normal file
18
shared_global/schema/shields/PageBlacklistSchema.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { model, Schema, Types } from 'mongoose';
|
||||
|
||||
export type TPageBlacklistSchema = {
|
||||
_id: Schema.Types.ObjectId,
|
||||
project_id: Schema.Types.ObjectId,
|
||||
page: string,
|
||||
description:string,
|
||||
created_at: Date
|
||||
}
|
||||
|
||||
const CountryBlacklistSchema = new Schema<TPageBlacklistSchema>({
|
||||
project_id: { type: Types.ObjectId, index: 1 },
|
||||
page: { type: String, required: true },
|
||||
description: { type: String },
|
||||
created_at: { type: Date, default: () => Date.now() },
|
||||
});
|
||||
|
||||
export const CountryBlacklistModel = model<TPageBlacklistSchema>('country_blacklists', CountryBlacklistSchema);
|
||||
Reference in New Issue
Block a user