Expand description
SeaORM entity for the session_records table (LIB-03).
Mirrors Python’s SessionRecord SQLAlchemy model at
cognee/modules/session_lifecycle/models.py:10-86 byte-for-byte:
- Composite primary key on
(session_id, user_id). statusdefaults to"running". The"abandoned"value is never written to the row — it is inferred at read time by LIB-05’seffective_statusSQL expression based onlast_activity_at.- Aggregate counters (
tokens_in,tokens_out,cost_usd,error_count) accumulate viaLLMGateway/SessionManagerhooks.
UUIDs (user_id, dataset_id) are persisted as 32-char hex strings to
match the rest of the schema (see uuid_hex.rs); LIB-05’s trait
converts uuid::Uuid ↔ String at the repository boundary.
Structs§
- Active
Model - Generated by sea-orm-macros
- Column
Iter - An iterator over the variants of Column
- Entity
- Generated by sea-orm-macros
- Model
- Primary
KeyIter - An iterator over the variants of PrimaryKey
- Relation
Iter - An iterator over the variants of Relation
Enums§
- Column
- Generated by sea-orm-macros
- Primary
Key - Generated by sea-orm-macros
- Relation