Back to Medusa

autoincrement

www/apps/resources/references/dml/Property/methods/dml.Property.autoincrement/page.mdx

2.14.2291 B
Original Source

import { TypeList } from "docs-ui"

autoincrement

This method defines an autoincrement property.

Example

ts
import { model } from "@medusajs/framework/utils"

const MyCustom = model.define("my_custom", {
  serial_id: model.autoincrement(),
  // ...
})

export default MyCustom