# Data Model
URL: https://pro.rv-grid.com/guides/gantt/concepts/data-model/
Source: src/content/docs/guides/gantt/concepts/data-model.mdx
Description: Required grid properties and Gantt entity collections.
This page is for wiring the minimum data surface.

Required entry points on `HTMLRevoGridElement`:

- `gantt`: project config (`GanttPluginConfig`)
- `source`: flat task rows
- `ganttCalendars`: `CalendarEntity[]`

Optional linked collections:

- `ganttDependencies`: `DependencyEntity[]`
- `ganttResources`: `ResourceEntity[]`
- `ganttAssignments`: `AssignmentEntity[]`
- `ganttBaselines`: `BaselineSnapshot[]`

Public shape is declared in:

- `packages/enterprise/plugins/gantt/grid/gantt-plugin.types.ts`
- `packages/enterprise/plugins/gantt/core/domain.ts`

## Flat Task Source Rows

Gantt reads task data from flat grid rows. Required fields are `id`, `name`, `startDate`, and either `duration` or `endDate`.

The public source row names match task-table editing conventions:

- `duration` maps to internal `durationDays`.
- `percentDone` maps to internal `progressPercent`.
- `taskMode` maps to internal `manuallyScheduled` (`manual` or `auto`).
- `status` is stored as the raw task status key, such as `in-progress`.

When both `duration` and `endDate` are present, `duration` is the scheduling input and Gantt resolves `endDate` from `startDate + duration`. This matches task-table editing, where duration edits drive the finish date. Use `endDate` without `duration` when the finish date should be the authored input.

Projected grid rows remain display-ready. `GanttGridRow.status` is the human-readable status label, while `GanttGridRow.statusKey` is the raw status key. Custom source fields are preserved by task id across recalculation and structural task changes unless the row is replaced without those fields.

## Temporal Field Precision

Task temporal fields (`startDate`, `endDate`, `actualStartDate`, `actualFinishDate`) accept:

- ISO date: `YYYY-MM-DD`
- UTC ISO datetime: `YYYY-MM-DDTHH:mm:ss.sssZ`

Runtime normalization rules:

- Datetime input is preserved and used for intraday scheduling precision.
- Date-only input is normalized to `T00:00:00Z`.

For new integrations, prefer explicit UTC datetime values when you need hour/minute planning behavior.
