Remote / foldkit-remote-drizzle

entity

function · packages/remote-drizzle/src/binding.ts:200

function entity<
  const Name extends string,
  Table extends DrizzleTable,
  const Relations extends Record<string, RelationBinding> = {},
  const Computed extends Record<string, ComputedConfig> = {},
  F extends Schema.Struct.Fields = SelectFields<Table>,
>(
  name: Name,
  table: Table,
  options?: {
    readonly fields?: F | undefined
    readonly relations?: Relations | undefined
    readonly computed?: Computed | undefined
    readonly visible?: Visible | undefined
  },
): EntityBinding<
  Name,
  Table,
  F & RelationFields<Relations> & ComputedFields<Computed>,
  Relations
>