initial commit
Some checks failed
linter / quality (push) Failing after 3m48s
tests / ci (push) Failing after 4m13s

This commit is contained in:
2025-07-12 15:01:28 -07:00
commit ee37c6de85
265 changed files with 28931 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
<?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('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
}
};

View File

@@ -0,0 +1,35 @@
<?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('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

View File

@@ -0,0 +1,57 @@
<?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('jobs', function (Blueprint $table) {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs');
}
};

View File

@@ -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('markets', function (Blueprint $table) {
$table->id();
$table->string("name");
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('markets');
}
};

View File

@@ -0,0 +1,29 @@
<?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('sub_markets', function (Blueprint $table) {
$table->id();
$table->string("name");
$table->foreignId("market_id")->constrained();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sub_markets');
}
};

View File

@@ -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('sales', function (Blueprint $table) {
$table->increments('id');
$table->string('sale_id');
$table->string('sale_name');
$table->string('record_type');
$table->string('status');
$table->string('comp_source')->nullable();
$table->date('date_last_verified')->nullable();
$table->string('property_name')->nullable();
$table->string('comp_id')->nullable();
$table->string('street')->nullable();
$table->string('city')->nullable();
$table->string('state_province')->nullable();
$table->string('zip_postal_code')->nullable();
$table->string('property_county')->nullable();
// $table->string('market')->nullable();
// $table->string('sub_market')->nullable();
$table->foreignId("market_id")->nullable()->constrained()->nullOnDelete();
$table->foreignId("sub_market_id")->nullable()->constrained()->nullOnDelete();
$table->string('property_sub_type')->nullable();
$table->integer('num_units')->nullable();
$table->integer('building_size_sf')->nullable();
$table->integer('year_built')->nullable();
$table->date('listing_date')->nullable();
$table->integer('dom_cumulative')->nullable();
$table->integer('original_listing_price')->nullable(); // in cents
$table->integer('listing_price')->nullable(); // in cents
$table->integer('adv_agi')->nullable(); // in cents
$table->integer('x_agi')->nullable(); // in cents
$table->integer('adv_noi')->nullable(); // in cents
$table->integer('x_noi')->nullable(); // in cents
$table->integer('asking_price_unit')->nullable(); // in cents
$table->integer('asking_price_sf')->nullable(); // in cents
$table->integer('asking_grm')->nullable(); // e.g. multiply 13.08 → 1308
$table->integer('asking_cap')->nullable(); // e.g. 4.98% → 498
$table->date('can_exp_wth_date')->nullable();
$table->integer('dom_can_exp')->nullable();
$table->date('pending_date')->nullable();
$table->integer('dom_pending')->nullable();
$table->date('sale_date')->nullable();
$table->integer('dom_sold')->nullable();
$table->integer('length_of_escrow')->nullable();
$table->integer('sale_price')->nullable(); // in cents
$table->integer('sold_price_unit')->nullable(); // in cents
$table->integer('sold_price_delivered')->nullable(); // in cents
$table->integer('sold_price_sf')->nullable(); // in cents
$table->string('sales_terms')->nullable();
$table->integer('sold_grm')->nullable(); // e.g. 12.61 → 1261
$table->integer('sold_cap')->nullable(); // e.g. 5.16% → 516
$table->integer('loan_amount')->nullable(); // in cents
$table->integer('percent_down_payment')->nullable(); // e.g. 100% → 10000
$table->boolean('owner_occ_purchase')->nullable(); // 1 or 0
$table->integer('land_area_acre')->nullable(); // e.g. 0.12 → 12 (store hundredths of an acre)
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sales');
}
};