Skip to content

Commit

Permalink
add composite key test; add missing timestamp properties
Browse files Browse the repository at this point in the history
  • Loading branch information
notbakaneko committed Dec 20, 2024
1 parent c9ad28d commit 421504c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Models/BeatmapTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
/**
* @property-read Beatmap $beatmap
* @property int $beatmap_id
* @property \Carbon\Carbon $created_at
* @property int $tag_id
* @property \Carbon\Carbon $updated_at
* @property-read User $user
* @property int $user_id
*/
Expand Down
11 changes: 11 additions & 0 deletions tests/Models/ModelCompositePrimaryKeysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use App\Models\BeatmapDifficulty;
use App\Models\BeatmapDifficultyAttrib;
use App\Models\BeatmapFailtimes;
use App\Models\BeatmapTag;
use App\Models\Chat;
use App\Models\FavouriteBeatmapset;
use App\Models\Forum;
Expand Down Expand Up @@ -112,6 +113,16 @@ public static function dataProviderBase()
['type' => 'exit'],
['p1', [0, 10], 11],
],
[
BeatmapTag::class,
[
'beatmap_id' => 0,
'tag_id' => 0,
'user_id' => 0,
],
['tag_id' => 1],
['updated_at', [Carbon::now()->subDays(5), Carbon::now()->subDays(1)], Carbon::now()],
],
[
Chat\UserChannel::class,
[
Expand Down

0 comments on commit 421504c

Please sign in to comment.