mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
35 lines
846 B
TypeScript
35 lines
846 B
TypeScript
/**
|
|
* Generic container for entity objects that provides standard properties for display and selection state.
|
|
* Used for consistent entity representation in lists, dropdowns, and selection components.
|
|
*
|
|
* @template T - The type of data contained within the entity container
|
|
*/
|
|
export interface EntityContainer<T> {
|
|
/**
|
|
* Unique identifier for the entity
|
|
*/
|
|
id: number;
|
|
|
|
/**
|
|
* Human-readable name for display in UI elements
|
|
*/
|
|
displayName?: string;
|
|
|
|
/**
|
|
* The actual entity data object
|
|
*/
|
|
data?: T;
|
|
|
|
/**
|
|
* Whether the entity is enabled/available for interaction
|
|
* When false, the entity might be shown as disabled in UI
|
|
*/
|
|
enabled?: boolean;
|
|
|
|
/**
|
|
* Whether the entity is currently selected
|
|
* Useful for multi-select interfaces
|
|
*/
|
|
selected?: boolean;
|
|
}
|