some ranamings and database changes

This commit is contained in:
2026-09-17 12:42:43 +02:00
parent ed347133ce
commit c5ba074c9b
11 changed files with 48 additions and 13 deletions
+3 -1
View File
@@ -3,14 +3,16 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
class Wishes extends Model
{
use HasUuids;
use HasFactory;
protected $table = 'wishes';
protected $fillable = ['title', 'description', 'reward', 'owner_id', 'status', 'agent_id', 'guest_id'];
protected $fillable = ['title', 'description', 'reward', 'owner_id', 'status', 'agent_id', 'guest_id', 'type', 'rune', 'color'];
public function agent(): BelongsTo
{
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace Database\Factories;
use App\Models\Model;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Model>
*/
class WishFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'title' => fake()->sentence(),
'decription' => fake()->paragraph(),
'reward' => fake()->word(),
];
}
}
@@ -20,6 +20,9 @@ return new class extends Migration
$table->string('owner_id')->nullable();
$table->foreignUuid('guest_id')->nullable();
$table->enum('status', ['posted', 'taken', 'disabled', 'completed'])->default('posted');
$table->unsignedTinyInteger('type')->default(0);
$table->unsignedTinyInteger('rune')->default(0);
$table->unsignedTinyInteger('color')->default(0);
$table->timestamps();
});
}
+6 -4
View File
@@ -3,6 +3,7 @@
namespace Database\Seeders;
use App\Models\User;
use App\Models\Wish;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
@@ -16,10 +17,11 @@ class DatabaseSeeder extends Seeder
public function run(): void
{
// User::factory(10)->create();
Wish::factory(10)->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
//User::factory()->create([
// 'name' => 'Test User',
// 'email' => 'test@example.com',
//]);
}
}

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

-1
View File
@@ -9,7 +9,6 @@
}
:root {
--ui-primary: rgb(255, 0, 0);
--background-color: rgb(10,10,10);
--color-primary: rgb(250, 250, 250);
--color-a-primary: rgb(142, 234, 252);
+7 -3
View File
@@ -4,8 +4,8 @@
<template>
<div class="wish-main">
<img :src="'/skonk/quest_backdrop_' + type + '.png'">
<div class="wish-sub">
<img class="wish-filter" :src="'/skonk/quest_backdrop_' + type + '.png'">
<div class="wish-sub" v-if="type <= 2">
<img :src="'/skonk/quest_rune_' + rune + '.png'">
</div>
</div>
@@ -18,7 +18,7 @@
props: {
type: {
type: Number,
default: 2,
default: 1,
},
rune: {
type: Number,
@@ -35,8 +35,12 @@
position: relative;
display: grid;
place-items: center;
}
.wish-sub {
position: absolute;
}
.wish-filter {
}
</style>
+2 -3
View File
@@ -1,10 +1,9 @@
<script lang="ts" setup>
import Wish from '../components/Wish.vue';
import {ref, onMounted} from 'vue';
</script>
<script lang="ts">
const wishes = ref();
</script>
<template>