1 | <?php |
||
8 | class FluidTable |
||
9 | { |
||
10 | /** |
||
11 | * @var FluidSchema |
||
12 | */ |
||
13 | private $schema; |
||
14 | /** |
||
15 | * @var Table |
||
16 | */ |
||
17 | private $table; |
||
18 | /** |
||
19 | * @var FluidColumn[] |
||
20 | */ |
||
21 | private $fluidColumns; |
||
22 | |||
23 | /** |
||
24 | * @param FluidSchema $schema |
||
25 | * @param Table $table |
||
26 | */ |
||
27 | public function __construct(FluidSchema $schema, Table $table) |
||
32 | |||
33 | public function column(string $name): FluidColumn |
||
48 | |||
49 | public function index(array $columnNames): FluidTable |
||
54 | |||
55 | public function unique(array $columnNames): FluidTable |
||
60 | |||
61 | public function primaryKey(array $columnNames, ?string $indexName = null): FluidTable |
||
68 | |||
69 | /** |
||
70 | * Creates a "id" autoincremented primary key column. |
||
71 | * |
||
72 | * @return FluidTable |
||
73 | */ |
||
74 | public function id(): FluidTable |
||
79 | |||
80 | /** |
||
81 | * Creates a "uuid" primary key column. |
||
82 | * |
||
83 | * @return FluidTable |
||
84 | */ |
||
85 | public function uuid(): FluidTable |
||
90 | |||
91 | /** |
||
92 | * Creates "created_at" and "updated_at" columns. |
||
93 | * |
||
94 | * @return FluidTable |
||
95 | */ |
||
96 | public function timestamps(): FluidTable |
||
102 | |||
103 | public function extends(string $tableName): FluidTable |
||
119 | } |
||
120 |