[**Documentation**](../../../README)

***

[Documentation](../../../README) / [zerotal](../../README) / [testing](../README) / FactoryPayload

# Type Alias: FactoryPayload\<T\>

> **FactoryPayload**\<`T`\> = `Omit`\<[`InsertPayload`](../../orm/type-aliases/InsertPayload)\<`T`\>, `FKKeys`\<`T`\> & keyof [`InsertPayload`](../../orm/type-aliases/InsertPayload)\<`T`\>\> & `Partial`\<`Pick`\<[`InsertPayload`](../../orm/type-aliases/InsertPayload)\<`T`\>, `FKKeys`\<`T`\> & keyof [`InsertPayload`](../../orm/type-aliases/InsertPayload)\<`T`\>\>\>

Defined in: [packages/testing/src/factory.ts:28](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/testing/src/factory.ts#L28)

The return type expected from a factory definition callback.

Like InsertPayload<T> but with all foreign-key fields (*Id) made optional —
they are injected at create-time via `.for(model)` or explicit overrides,
so the factory definition does not need to supply them.

Non-FK required fields (title, body, name, email, …) remain required,
giving the definition callback full type safety without false positives.

## Type Parameters

### T

`T` *extends* [`BaseModel`](../../orm/classes/BaseModel)
