diff --git a/web/app/Models/asset.php b/web/app/Models/asset.php index c419514..7d4bcf3 100644 --- a/web/app/Models/asset.php +++ b/web/app/Models/asset.php @@ -5,7 +5,7 @@ namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; -class asset extends Model +class Asset extends Model { use HasFactory; } diff --git a/web/database/migrations/2022_06_05_140351_create_assets_table.php b/web/database/migrations/2022_06_05_140351_create_assets_table.php index 644c902..425bced 100644 --- a/web/database/migrations/2022_06_05_140351_create_assets_table.php +++ b/web/database/migrations/2022_06_05_140351_create_assets_table.php @@ -15,6 +15,24 @@ return new class extends Migration { Schema::create('assets', function (Blueprint $table) { $table->id(); + + $table->unsignedBigInteger('creatorId'); + $table->string('name'); + $table->string('description')->nullable(); + + $table->boolean('approved')->default(false); + $table->boolean('moderated')->default(false); + + $table->unsignedBigInteger('priceInTokens')->default(15); + $table->unsignedBigInteger('sales')->default(0); + $table->boolean('onSale')->default(false); + + $table->unsignedSmallInteger('assetTypeId'); + + // Calculating the thumbnail subdomain on runtime is too expensive. + $table->string('thumbnailURL')->nullable(); + $table->string('3dThumbnailURL')->nullable(); + $table->timestamps(); }); }