---
title: Product Model
description: Product represents a good or service that can be sold. 
---

If you are implementing a `Product` model, make sure you pass `productId` to the `Price` model. This way, you can associate a price with a product.

## Type
Depending on your app's architecture, products can belong to a [Family](/integrations/models/family) or be standalone entities.
In both cases, you can start by implementing a standalone Product model, and later refactor it to add families support.

If you implement a family-based product, you will need to create [a Families controller](/integrations/controllers/families) and set the `familyId` property on the product.

## Properties
:field-schema{schema="/types/product/product.type"}

## Code Example
::code-group
```typescript [Typescript (SDK)]
import { Integrator } from '@churnkey/sdk'

// export class Product extends Integrator.Product.Family {
export class Product extends Integrator.Product.Standalone {
    constructor(product: YourProduct) {
        super({
            id: product.id,
            ... // map other properties
        })
    }
}
```
```typescript [Typescript]
interface Product {
    id: string
    type: Type
    name: string
    description?: string
    unitLabel?: string
    familyId?: string
}

export function Product(product: YourProduct): Product {
    return {
        id: product.id,
        ... // map other properties
    }
}

enum Type {
    Standalone = "standalone",
    Family = "family"
}
```
::
