committed by
GitHub
parent
10962a5c54
commit
5093224914
@@ -0,0 +1,22 @@
|
||||
import { model } from "@medusajs/framework/utils"
|
||||
import { IndexMetadataStatus } from "../utils/index-metadata-status"
|
||||
|
||||
const IndexMetadata = model
|
||||
.define("IndexMetadata", {
|
||||
id: model.id().primaryKey(),
|
||||
entity: model.text(),
|
||||
fields: model.text(),
|
||||
fields_hash: model.text(),
|
||||
status: model
|
||||
.enum(IndexMetadataStatus)
|
||||
.default(IndexMetadataStatus.PENDING),
|
||||
})
|
||||
.indexes([
|
||||
{
|
||||
name: "IDX_index_metadata_entity",
|
||||
on: ["entity"],
|
||||
unique: true,
|
||||
},
|
||||
])
|
||||
|
||||
export default IndexMetadata
|
||||
@@ -1,2 +1,3 @@
|
||||
export { default as IndexData } from "./index-data"
|
||||
export { default as IndexMetadata } from "./index-metadata"
|
||||
export { default as IndexRelation } from "./index-relation"
|
||||
|
||||
Reference in New Issue
Block a user