Create migration and model for taxrates.

This commit is contained in:
2024-11-26 08:03:05 +01:00
parent 1cb12659a2
commit 2daea2c10a
2 changed files with 44 additions and 0 deletions

11
app/Models/Taxrate.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Taxrate extends Model
{
use SoftDeletes;
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('taxrates', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->decimal('rate', 8, 2)->default(0);
$table->boolean('active')->default(false);
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('taxrates');
}
};