Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gammamatrix committed Apr 28, 2024
1 parent d3caf9c commit 5e4f0e9
Show file tree
Hide file tree
Showing 24 changed files with 146 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/Models/Board.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,18 @@ public function milestone(): HasOne
);
}

/**
* The note of the board.
*/
public function note(): HasOne
{
return $this->hasOne(
Note::class,
'id',
'note_id'
);
}

/**
* The project of the board.
*/
Expand Down
12 changes: 12 additions & 0 deletions src/Models/Epic.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,18 @@ public function milestone(): HasOne
);
}

/**
* The note of the epic.
*/
public function note(): HasOne
{
return $this->hasOne(
Note::class,
'id',
'note_id'
);
}

/**
* The project of the epic.
*/
Expand Down
12 changes: 12 additions & 0 deletions src/Models/Milestone.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,18 @@ public function matrix(): HasOne
);
}

/**
* The note of the milestone.
*/
public function note(): HasOne
{
return $this->hasOne(
Note::class,
'id',
'note_id'
);
}

/**
* The project of the milestone.
*/
Expand Down
12 changes: 12 additions & 0 deletions src/Models/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,18 @@ public function milestone(): HasOne
);
}

/**
* The note of the project.
*/
public function note(): HasOne
{
return $this->hasOne(
Note::class,
'id',
'note_id'
);
}

/**
* The release of the project.
*/
Expand Down
12 changes: 12 additions & 0 deletions src/Models/Release.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,18 @@ public function milestone(): HasOne
);
}

/**
* The note of the release.
*/
public function note(): HasOne
{
return $this->hasOne(
Note::class,
'id',
'note_id'
);
}

/**
* The project of the release.
*/
Expand Down
12 changes: 12 additions & 0 deletions src/Models/Roadmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,18 @@ public function milestone(): HasOne
);
}

/**
* The note of the roadmap.
*/
public function note(): HasOne
{
return $this->hasOne(
Note::class,
'id',
'note_id'
);
}

/**
* The project of the roadmap.
*/
Expand Down
14 changes: 13 additions & 1 deletion src/Models/Sprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ public function flow(): HasOne
}

/**
* The matrix of the board.
* The matrix of the sprint.
*/
public function matrix(): HasOne
{
Expand All @@ -480,6 +480,18 @@ public function matrix(): HasOne
);
}

/**
* The note of the sprint.
*/
public function note(): HasOne
{
return $this->hasOne(
Note::class,
'id',
'note_id'
);
}

/**
* The milestone of the sprint.
*/
Expand Down
14 changes: 13 additions & 1 deletion src/Models/Ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ protected function casts(): array
'introduction' => 'string',
'content' => 'string',
'summary' => 'string',
'key' => 'string',
'handler' => 'string',
'key' => 'string',
'code' => 'integer',
'key_code_hash' => 'string',
'priority' => 'string',
Expand Down Expand Up @@ -612,6 +612,18 @@ public function milestone(): HasOne
);
}

/**
* The note of the ticket.
*/
public function note(): HasOne
{
return $this->hasOne(
Note::class,
'id',
'note_id'
);
}

/**
* The project of the ticket.
*/
Expand Down
5 changes: 5 additions & 0 deletions tests/Feature/Models/Board/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ class ModelTest extends ModelCase
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Milestone::class,
],
'note' => [
'key' => 'note_id',
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Note::class,
],
'project' => [
'key' => 'project_id',
'rule' => 'create',
Expand Down
5 changes: 5 additions & 0 deletions tests/Feature/Models/Epic/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ class ModelTest extends ModelCase
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Milestone::class,
],
'note' => [
'key' => 'note_id',
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Note::class,
],
'project' => [
'key' => 'project_id',
'rule' => 'create',
Expand Down
5 changes: 5 additions & 0 deletions tests/Feature/Models/Milestone/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ class ModelTest extends ModelCase
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Matrix::class,
],
'note' => [
'key' => 'note_id',
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Note::class,
],
'project' => [
'key' => 'project_id',
'rule' => 'create',
Expand Down
5 changes: 5 additions & 0 deletions tests/Feature/Models/Project/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ class ModelTest extends ModelCase
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Matrix::class,
],
'note' => [
'key' => 'note_id',
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Note::class,
],
'milestone' => [
'key' => 'milestone_id',
'rule' => 'create',
Expand Down
5 changes: 5 additions & 0 deletions tests/Feature/Models/Release/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ class ModelTest extends ModelCase
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Milestone::class,
],
'note' => [
'key' => 'note_id',
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Note::class,
],
'project' => [
'key' => 'project_id',
'rule' => 'create',
Expand Down
5 changes: 5 additions & 0 deletions tests/Feature/Models/Roadmap/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ class ModelTest extends ModelCase
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Milestone::class,
],
'note' => [
'key' => 'note_id',
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Note::class,
],
'project' => [
'key' => 'project_id',
'rule' => 'create',
Expand Down
5 changes: 5 additions & 0 deletions tests/Feature/Models/Sprint/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ class ModelTest extends ModelCase
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Matrix::class,
],
'note' => [
'key' => 'note_id',
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Note::class,
],
'milestone' => [
'key' => 'milestone_id',
'rule' => 'create',
Expand Down
5 changes: 5 additions & 0 deletions tests/Feature/Models/Ticket/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ class ModelTest extends ModelCase
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Milestone::class,
],
'note' => [
'key' => 'note_id',
'rule' => 'create',
'modelClass' => \Playground\Matrix\Models\Note::class,
],
'project' => [
'key' => 'project_id',
'rule' => 'create',
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Models/Board/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ModelTest extends ModelCase
'flow',
'matrix',
'milestone',
'note',
'project',
'release',
'roadmap',
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Models/Epic/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ModelTest extends ModelCase
'flow',
'matrix',
'milestone',
'note',
'project',
'release',
'roadmap',
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Models/Milestone/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ModelTest extends ModelCase
'epic',
'flow',
'matrix',
'note',
'project',
'release',
'roadmap',
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Models/Project/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ModelTest extends ModelCase
'flow',
'matrix',
'milestone',
'note',
'release',
'roadmap',
'source',
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Models/Release/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ModelTest extends ModelCase
'flow',
'matrix',
'milestone',
'note',
'project',
'roadmap',
'source',
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Models/Roadmap/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ModelTest extends ModelCase
'flow',
'matrix',
'milestone',
'note',
'project',
'release',
'source',
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Models/Sprint/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ModelTest extends ModelCase
'flow',
'matrix',
'milestone',
'note',
'project',
'release',
'roadmap',
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Models/Ticket/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class ModelTest extends ModelCase
'flow',
'matrix',
'milestone',
'note',
'project',
'release',
'reportedBy',
Expand Down

0 comments on commit 5e4f0e9

Please sign in to comment.