ItemBase
This class serves as a base data model for items, defining the core attributes required for item representation. It includes a mandatory title with length constraints and an optional description field.
Attributes
| Attribute | Type | Description |
|---|---|---|
| title | str | The primary display name of the item, which must be between 1 and 255 characters in length. |
| description | `str | None` = None |
Constructor
Signature
def ItemBase(
title: string,
description: string | null = null
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| title | string | The title of the item, must be between 1 and 255 characters. |
| description | `string | null` = null |
Methods
title()
def title() - > str
The primary name or label of the item.
Returns
| Type | Description |
|---|---|
str | A string between 1 and 255 characters representing the item title. |
description()
def description() - > str | None
An optional detailed explanation providing additional context about the item.
Returns
| Type | Description |
|---|---|
| `str | None` |