! Merge branch 'dev'
This commit is contained in:
@@ -31,7 +31,7 @@ class Remainder extends Model
|
||||
|
||||
protected $casts = [
|
||||
'status' => RemainderStatus::class,
|
||||
'due_at' => 'datetime',
|
||||
'due_at' => 'datetime:Y-m-d H:i:s',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,10 +25,12 @@ class RemainderFactory extends Factory
|
||||
false => null
|
||||
};
|
||||
|
||||
|
||||
return [
|
||||
'discord_user_id' => DiscordUser::factory(),
|
||||
'channel_id' => $channel_id,
|
||||
'due_at' => $this->faker->dateTimeBetween('now', '+1 year'),
|
||||
//NOTE: Trend does not play well with the default DateTime format (ex.: 2025-05-12T08:18:51.000000Z)
|
||||
'due_at' => $this->faker->dateTimeBetween('now', '+1 year')->format('Y-m-d H:i:s'),
|
||||
'message' => $this->faker->realText(32),
|
||||
'status' => RemainderStatus::NEW->value,
|
||||
];
|
||||
|
||||
@@ -21,8 +21,8 @@ class DiscordUserSeeder extends Seeder
|
||||
|
||||
// Creating Discord Users
|
||||
$discordUsers = DiscordUser::factory()->times($discordUserCount)->make(
|
||||
//TODO? maybe add sum random creation times here ex.:->subSeconds(rand(0, 30 * 24 * 60 * 60))
|
||||
['created_at' => Carbon::now()]
|
||||
['created_at' => Carbon::now()
|
||||
->subSeconds(rand(0, 30 * 24 * 60 * 60))] // randomize to the last 30 days
|
||||
);
|
||||
|
||||
// Saving Discord Users
|
||||
@@ -46,6 +46,7 @@ class DiscordUserSeeder extends Seeder
|
||||
'discord_user_id' => $discordUser->id,
|
||||
'created_at' => Carbon::now(),
|
||||
]);
|
||||
|
||||
// add remainder to buffer
|
||||
$remainders = $remainders->concat($discordUserRemainders);
|
||||
if ($remainders->count() >= $chunkSize) {
|
||||
|
||||
Reference in New Issue
Block a user