first commit
This commit is contained in:
1
database/.gitignore
vendored
Normal file
1
database/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.sqlite*
|
||||
44
database/factories/UserFactory.php
Normal file
44
database/factories/UserFactory.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The current password being used by the factory.
|
||||
*/
|
||||
protected static ?string $password;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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('exp_mgt_analysis_header', static function (Blueprint $table) {
|
||||
$table->id('IDEXP_MGT_ANALYSIS_HEADER');
|
||||
$table->timestamp('CREATION_DATE');
|
||||
$table->integer('CREATED_BY');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('exp_mgt_analysis_header');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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("exp_mgt_analysis_lines", function (Blueprint $table) {
|
||||
$table->id("IDEXP_MGT_ANALYSIS_LINES");
|
||||
$table->unsignedBigInteger("IDEXP_MGT_ANALYSIS_HEADER");
|
||||
$table->string("CUSTOMER_GROUP_CODE", 20)->nullable();
|
||||
$table->string("ITEMCODE", 50);
|
||||
$table->string("MTH", 50);
|
||||
$table->string("ORG", 50);
|
||||
$table->string("AREA", 50);
|
||||
$table->string("LOC_CUR", 50);
|
||||
$table->string("CUST_GRP", 50)->nullable();
|
||||
$table->string("ITEM_CODE");
|
||||
$table->string("ITEM_DESC", 50);
|
||||
$table->string("GIM_ID", 25);
|
||||
$table->string("GIM_CAT_NUM", 50);
|
||||
$table->string("GIM_DESC", 50);
|
||||
$table->string("GIM_STER_FLAG", 50);
|
||||
$table->string("BRAND", 50);
|
||||
$table->string("SUB_BRAND", 50);
|
||||
$table->string("GIM_ITEM_TYPE", 100)->nullable();
|
||||
$table->string("FRANCHISE", 50);
|
||||
$table->string("SUB_FRANCHISE", 50);
|
||||
$table->integer("GIM_LCC");
|
||||
$table->integer("ELA_ITEM_STATUS");
|
||||
$table->decimal("ITEM_MGT_COST");
|
||||
$table->string("RSM", 50)->nullable();
|
||||
$table->string("REP", 50)->nullable();
|
||||
$table->string("SAPG", 50)->nullable();
|
||||
$table->string("EARL_IMPL_DATE", 50)->nullable();
|
||||
$table->integer("LTC_QTY");
|
||||
$table->integer("LTC_QTY_INCL_PND");
|
||||
$table->integer("LTC_QTY_PND");
|
||||
$table->integer("LTC_IMP_QTY");
|
||||
$table->decimal("LTC_IMP_VAL");
|
||||
$table->decimal("LTC_INV_VAL_INCL_PND");
|
||||
$table->decimal("SAL_AMT_3_MTH_LC", 12);
|
||||
$table->decimal("SAL_AMT_6_MTH_LC", 12);
|
||||
$table->decimal("SAL_AMT_12_MTH_LC", 12);
|
||||
$table->integer("SAL_QTY_3_MTH");
|
||||
$table->integer("SAL_QTY_6_MTH");
|
||||
$table->integer("SAL_QTY_12_MTH");
|
||||
$table->decimal("SAL_QTY_AVG");
|
||||
$table->integer("SAL_QTY_MAX");
|
||||
$table->decimal("SAL_QTY_STDDEV");
|
||||
$table->decimal("TWELVE_MTH_COGS", 12);
|
||||
$table->decimal("TWELVE_MTH_COGS_CALC", 12);
|
||||
$table->integer("OPT_QTY_COL");
|
||||
$table->decimal("OPT_VAL_COL");
|
||||
$table->decimal("DOH");
|
||||
$table->decimal("OPTY");
|
||||
$table->integer("LINE_NUMBER");
|
||||
$table->string("CUSTOMER_NUMBER", 50)->nullable();
|
||||
$table->timestamp("CREATIONDATE");
|
||||
$table->string("CREATEDBY", 100);
|
||||
$table->string("CUSTOMER_GROUP_NAME", 50);
|
||||
|
||||
$table->foreign("IDEXP_MGT_ANALYSIS_HEADER")->references("IDEXP_MGT_ANALYSIS_HEADER")->on("exp_mgt_analysis_header");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists("exp_mgt_analysis_lines");
|
||||
}
|
||||
};
|
||||
23
database/seeders/DatabaseSeeder.php
Normal file
23
database/seeders/DatabaseSeeder.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// User::factory(10)->create();
|
||||
|
||||
User::factory()->create([
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user