some ranamings and database changes
@@ -3,14 +3,16 @@
|
|||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
||||||
|
|
||||||
class Wishes extends Model
|
class Wishes extends Model
|
||||||
{
|
{
|
||||||
use HasUuids;
|
use HasUuids;
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
protected $table = 'wishes';
|
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
|
public function agent(): BelongsTo
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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->string('owner_id')->nullable();
|
||||||
$table->foreignUuid('guest_id')->nullable();
|
$table->foreignUuid('guest_id')->nullable();
|
||||||
$table->enum('status', ['posted', 'taken', 'disabled', 'completed'])->default('posted');
|
$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();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace Database\Seeders;
|
namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use App\Models\Wish;
|
||||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
@@ -16,10 +17,11 @@ class DatabaseSeeder extends Seeder
|
|||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
// User::factory(10)->create();
|
// User::factory(10)->create();
|
||||||
|
Wish::factory(10)->create();
|
||||||
|
|
||||||
User::factory()->create([
|
//User::factory()->create([
|
||||||
'name' => 'Test User',
|
// 'name' => 'Test User',
|
||||||
'email' => 'test@example.com',
|
// '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 |
@@ -9,7 +9,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--ui-primary: rgb(255, 0, 0);
|
|
||||||
--background-color: rgb(10,10,10);
|
--background-color: rgb(10,10,10);
|
||||||
--color-primary: rgb(250, 250, 250);
|
--color-primary: rgb(250, 250, 250);
|
||||||
--color-a-primary: rgb(142, 234, 252);
|
--color-a-primary: rgb(142, 234, 252);
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="wish-main">
|
<div class="wish-main">
|
||||||
<img :src="'/skonk/quest_backdrop_' + type + '.png'">
|
<img class="wish-filter" :src="'/skonk/quest_backdrop_' + type + '.png'">
|
||||||
<div class="wish-sub">
|
<div class="wish-sub" v-if="type <= 2">
|
||||||
<img :src="'/skonk/quest_rune_' + rune + '.png'">
|
<img :src="'/skonk/quest_rune_' + rune + '.png'">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 2,
|
default: 1,
|
||||||
},
|
},
|
||||||
rune: {
|
rune: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -35,8 +35,12 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: grid;
|
display: grid;
|
||||||
place-items: center;
|
place-items: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
.wish-sub {
|
.wish-sub {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
.wish-filter {
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import Wish from '../components/Wish.vue';
|
import Wish from '../components/Wish.vue';
|
||||||
|
import {ref, onMounted} from 'vue';
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
const wishes = ref();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||