### defineModel · function

Register a model class with the Edinburgh ORM system.

Converts a plain class into a fully-featured model with database persistence,
typed fields, primary key access, and optional secondary and unique indexes.

**Signature:** `<T extends new () => any, const PK extends (keyof ModelFields<T> & string) | readonly (keyof ModelFields<T> & string)[], const UNIQUE extends Record<string, IndexSpec<T>>, const INDEX extends Record<string, IndexSpec<T>>>(tableName: string, cls: T, opts?: { ...; }) => ModelClass<...>`

**Type Parameters:**

- `T extends new () => any`
- `PK extends (keyof ModelFields<T> & string) | readonly (keyof ModelFields<T> & string)[]`
- `UNIQUE extends Record<string, IndexSpec<T>>`
- `INDEX extends Record<string, IndexSpec<T>>`

**Parameters:**

- `tableName: string` - The database table name for this model.
- `cls: T` - A plain class whose properties use E.field().
- `opts?: { pk?: PK, unique?: UNIQUE, index?: INDEX, override?: boolean }` - Registration options.

**Returns:** The enhanced model constructor.
