Skip to content

Commit 034a158

Browse files
committed
attribute class
1 parent 7e2ea50 commit 034a158

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

app/Core/Db/DbColumn.php

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Leantime\Core\Db;
4+
5+
use Attribute;
6+
7+
#[Attribute]
8+
class DbColumn
9+
{
10+
public function __construct(
11+
public string $name,
12+
) {
13+
//
14+
}
15+
}

app/Domain/Connector/Models/Integration.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
namespace Leantime\Domain\Connector\Models {
44

5-
/**
6-
*
7-
*/
5+
use Leantime\Core\Db\DbColumn;
6+
87
class Integration
98
{
109
#[DbColumn('id')]
@@ -43,10 +42,7 @@ class Integration
4342
#[DbColumn('lastSync')]
4443
public ?string $lastSync;
4544

46-
47-
public function __construct()
48-
{
49-
}
45+
public function __construct() {}
5046
}
5147

5248
}

0 commit comments

Comments
 (0)