-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLegacyTableSchema.php
47 lines (39 loc) · 948 Bytes
/
LegacyTableSchema.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
declare(strict_types=1);
namespace EventSauce\MessageRepository\TableSchema;
use EventSauce\EventSourcing\Header;
/**
* Table schema used prior to version 1.0
*
* @link https://github.com/EventSaucePHP/DoctrineMessageRepository
*/
final class LegacyTableSchema implements TableSchema
{
public function incrementalIdColumn(): string
{
return 'id';
}
public function eventIdColumn(): string
{
return 'event_id';
}
public function aggregateRootIdColumn(): string
{
return 'aggregate_root_id';
}
public function versionColumn(): string
{
return 'aggregate_root_version';
}
public function payloadColumn(): string
{
return 'payload';
}
public function additionalColumns(): array
{
return [
'event_type' => Header::EVENT_TYPE,
'time_of_recording' => Header::TIME_OF_RECORDING,
];
}
}