Data definition with simple types #1

Closed
opened 2026-07-14 15:39:13 +02:00 by c.fahner · 1 comment
Owner

Provide interfaces that define the shape of entities (ie. the schema).

Provide interfaces that define the shape of entities (ie. the schema).
c.fahner added this to the v0.1 milestone 2026-07-14 15:39:13 +02:00
c.fahner changed title from Data definition to Data definition with built-in types 2026-07-27 14:46:58 +02:00
c.fahner added spent time 2026-07-27 14:47:03 +02:00
4 hours
Author
Owner

Only basic types (string|float|int|bool|null) for the first iteration. Defining an entity should require as little typing as possible. Schema is produced by reflecting over the constructor parameters.

final readonly class MyEntity implements Entity, Entity\Identifiable {

  public function __construct(
    #[Override]
    public Entity\Id $id,

    /** @var non-empty-string */
    public string $name,

    // etc.
  ) { }

}
Only basic types (`string|float|int|bool|null`) for the first iteration. Defining an entity should require as little typing as possible. Schema is produced by reflecting over the constructor parameters. ```php final readonly class MyEntity implements Entity, Entity\Identifiable { public function __construct( #[Override] public Entity\Id $id, /** @var non-empty-string */ public string $name, // etc. ) { } } ```
c.fahner changed title from Data definition with built-in types to Data definition with simple types 2026-07-28 07:18:59 +02:00
c.fahner stopped working 2026-07-28 09:01:10 +02:00
1 hour 2 minutes
c.fahner stopped working 2026-07-28 14:12:24 +02:00
2 hours 43 minutes
c.fahner stopped working 2026-07-29 10:09:00 +02:00
21 minutes 58 seconds
c.fahner canceled time tracking 2026-08-01 21:39:28 +02:00
c.fahner added spent time 2026-08-01 21:39:40 +02:00
5 hours 30 minutes
c.fahner added spent time 2026-08-02 10:00:46 +02:00
1 hour 20 minutes
c.fahner stopped working 2026-08-02 14:50:39 +02:00
1 hour 11 minutes
c.fahner referenced this issue from a commit 2026-08-03 21:00:32 +02:00
c.fahner added spent time 2026-08-03 21:00:47 +02:00
2 hours 30 minutes
c.fahner stopped working 2026-08-08 09:44:35 +02:00
48 minutes 55 seconds
c.fahner added spent time 2026-08-08 10:15:33 +02:00
20 minutes
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Total time spent: 19 hours 48 minutes
c.fahner
19 hours 48 minutes
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
slendium/ocd#1
No description provided.