Type Alias: HasManyThroughRelationOptions<RelatedModel>
ts
type HasManyThroughRelationOptions<RelatedModel> = Omit<
ThroughRelationOptions<
RelatedModel,
LucidModel,
HasManyThrough<RelatedModel>
>,
"throughModel"
>;Options for hasManyThrough relation decorators.
Type Parameters
| Type Parameter |
|---|
RelatedModel extends LucidModel |
Example
ts
import { resourcefulHasManyThrough } from "@nhtio/lucid-resourceful";
class User {
@resourcefulHasManyThrough([() => Role, () => UserRolePivot], {
foreignKey: "user_id",
})
public roles: HasManyThrough<typeof Role>;
}