mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
Merge 2a464426cb
into c5abe12971
This commit is contained in:
commit
b12e3d0e5c
@ -38,6 +38,7 @@ export class AttachmentStub extends BaseSchema {
|
||||
@Prop({
|
||||
type: String,
|
||||
required: true,
|
||||
index: true,
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024 Hexastack. All rights reserved.
|
||||
* Copyright © 2025 Hexastack. All rights reserved.
|
||||
*
|
||||
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
|
||||
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
|
||||
@ -29,12 +29,14 @@ export class SubscriberStub extends BaseSchema {
|
||||
@Prop({
|
||||
type: String,
|
||||
required: true,
|
||||
index: true,
|
||||
})
|
||||
first_name: string;
|
||||
|
||||
@Prop({
|
||||
type: String,
|
||||
required: true,
|
||||
index: true,
|
||||
})
|
||||
last_name: string;
|
||||
|
||||
@ -66,6 +68,7 @@ export class SubscriberStub extends BaseSchema {
|
||||
|
||||
@Prop({
|
||||
type: String,
|
||||
index: true,
|
||||
})
|
||||
foreign_id: string;
|
||||
|
||||
@ -154,7 +157,10 @@ export type SubscriberDocument = THydratedDocument<Subscriber>;
|
||||
|
||||
export const SubscriberModel: ModelDefinition = LifecycleHookManager.attach({
|
||||
name: Subscriber.name,
|
||||
schema: SchemaFactory.createForClass(SubscriberStub),
|
||||
schema: SchemaFactory.createForClass(SubscriberStub).index({
|
||||
first_name: 1,
|
||||
last_name: 1,
|
||||
}),
|
||||
});
|
||||
|
||||
export default SubscriberModel.schema;
|
||||
|
@ -34,7 +34,7 @@ export class ContentStub extends BaseSchema {
|
||||
/**
|
||||
* The title of the content.
|
||||
*/
|
||||
@Prop({ type: String, required: true })
|
||||
@Prop({ type: String, required: true, index: true })
|
||||
title: string;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024 Hexastack. All rights reserved.
|
||||
* Copyright © 2025 Hexastack. All rights reserved.
|
||||
*
|
||||
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
|
||||
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
|
||||
@ -107,7 +107,10 @@ export type NlpSampleEntityDocument = THydratedDocument<NlpSampleEntity>;
|
||||
export const NlpSampleEntityModel: ModelDefinition =
|
||||
LifecycleHookManager.attach({
|
||||
name: NlpSampleEntity.name,
|
||||
schema: SchemaFactory.createForClass(NlpSampleEntityStub),
|
||||
schema: SchemaFactory.createForClass(NlpSampleEntityStub).index(
|
||||
{ sample: 1, entity: 1, value: 1 },
|
||||
{ unique: true },
|
||||
),
|
||||
});
|
||||
|
||||
export default NlpSampleEntityModel.schema;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024 Hexastack. All rights reserved.
|
||||
* Copyright © 2025 Hexastack. All rights reserved.
|
||||
*
|
||||
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
|
||||
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
|
||||
@ -26,7 +26,7 @@ export class NlpSampleStub extends BaseSchema {
|
||||
/**
|
||||
* The content of the sample.
|
||||
*/
|
||||
@Prop({ type: String, required: true })
|
||||
@Prop({ type: String, required: true, index: true })
|
||||
text: string;
|
||||
|
||||
/**
|
||||
|
@ -119,7 +119,10 @@ export type NlpValueDocument = THydratedDocument<NlpValue>;
|
||||
|
||||
export const NlpValueModel: ModelDefinition = LifecycleHookManager.attach({
|
||||
name: NlpValue.name,
|
||||
schema: SchemaFactory.createForClass(NlpValueStub),
|
||||
schema: SchemaFactory.createForClass(NlpValueStub).index(
|
||||
{ value: 1, entity: 1 },
|
||||
{ unique: true },
|
||||
),
|
||||
});
|
||||
|
||||
export default NlpValueModel.schema;
|
||||
|
Loading…
Reference in New Issue
Block a user