Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
Column | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace Miniframe\ORM\Annotation; |
4 | |
5 | /** |
6 | * Column annotation |
7 | * |
8 | * @Annotation |
9 | */ |
10 | class Column |
11 | { |
12 | /** |
13 | * Is the column the primary key? |
14 | * |
15 | * @var bool |
16 | */ |
17 | public $primaryKey = false; |
18 | |
19 | /** |
20 | * Is the value unsigned (only positive numbers) or signed (positive and negative numbers)? |
21 | * |
22 | * @var bool |
23 | */ |
24 | public $unsigned = false; |
25 | |
26 | /** |
27 | * Is autoincrement enabled? |
28 | * |
29 | * @var bool |
30 | */ |
31 | public $autoIncrement = false; |
32 | |
33 | /** |
34 | * Can the column contain null values? |
35 | * |
36 | * @var bool |
37 | */ |
38 | public $nullable = false; |
39 | |
40 | /** |
41 | * Column name |
42 | * |
43 | * @var string |
44 | */ |
45 | public $name; |
46 | |
47 | /** |
48 | * Data type |
49 | * |
50 | * @Enum({"text","int","varchar","boolean","date","datetime"}) |
51 | */ |
52 | public $type; |
53 | |
54 | /** |
55 | * Length of the value |
56 | * |
57 | * @var int |
58 | */ |
59 | public $length; |
60 | |
61 | /** |
62 | * Default value |
63 | * |
64 | * @var string |
65 | */ |
66 | public $default; |
67 | |
68 | /** |
69 | * Name of the index (must be unique for the whole database) |
70 | * |
71 | * @var string |
72 | */ |
73 | public $index; |
74 | } |