Getting Started
Applied Actions
Data Request ActionsLogin Request ActionsBus ActionsExcitation System ActionsGenerator ActionsIBR ActionsllcHVDClink ActionsLoad ActionsSeries Capacitor ActionsSeries Fact ActionsShunt Capacitor ActionsShunt Fact ActionsShunt Reactor ActionsSingleLineDiagram ActionsTransformersThreeWinding ActionsTransformersTwoWinding ActionsTransmission Lines ActionsTurbine Governor ActionsUser ActionsTransmission Lines Actions
Model Schemas
Bus ModelsChanges modelsDefault params modelsExcitation System modelsGenerator ModelsIBR ModelsllcHVDClink ModelsvscHVDClink ModelsLoad ModelsHistory ModelsSeries Capacitor ModelsSeries Fact ModelsShunt Capacitor ActionsShunt Fact ModelsShunt Reactor ModelsSingleLineDiagram ModelsTransformersThreeWinding ModelsTransformersTwoWinding ModelsTransmission Lines ModelsTurbine Governor ModelsUser Models
Components
Add Columns ComponentCreate Form ComponentDelete Confirmation ComponentDisplay Table ComponentFile Upload ComponentFiltered History ComponentForm Skeleton ComponentLogin Form ComponentLogin Provider ComponentNavbar ComponentNothing to Display ComponentPush Mock Data ComponentRegistration Form ComponentSearch ComponentSidebar ComponentTable Heading ComponentTable Skeleton Component
Shunt Fact Schema
This script defines a Mongoose schema for shunt facts, featuring an ID field and supporting mixed data type fields. It enables real-time change stream monitoring and exports the ShuntFacts model for CRUD operations on MongoDB.
In the src/content/docs/models directory, You can find the ShuntFacts.mdx
Functions
shuntFactsSchema
const shuntFactsSchema = new Schema(
{
id: {
type: String,
},
additionalFields: {
type: Schema.Types.Mixed,
default: {},
},
},
{
collectionOptions: { changeStreamPreAndPostImages: { enabled: true } },
}
);
This code defines a Mongoose schema for representing shunt facts in a database. It includes an ID field and allows for additional custom fields stored as mixed data types. The schema enables change stream monitoring for real-time updates. The exported model, ShuntFacts, provides an interface for CRUD operations on the MongoDB collection containing shunt facts data.
Scroll to top