Working on assets, todo later

This commit is contained in:
Graphictoria 2022-06-09 22:50:09 -04:00
parent fdc09544f5
commit 899691b710
2 changed files with 19 additions and 1 deletions

View File

@ -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;
}

View File

@ -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();
});
}