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

12
app/Models/Market.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Market extends Model
{
/** @use HasFactory<\Database\Factories\MarketFactory> */
use HasFactory;
}

42
app/Models/Sale.php Normal file
View File

@@ -0,0 +1,42 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Sale extends Model
{
/** @use HasFactory<\Database\Factories\SaleFactory> */
use HasFactory;
protected $appends = [
"address",
];
public function address(): Attribute
{
return Attribute::get(function () {
$parts = [
$this->street,
$this->city,
$this->state_province,
$this->zip_postal_code,
];
return implode(', ', array_filter($parts));
});
}
public function market()
{
return $this->belongsTo(Market::class);
}
public function subMarket()
{
return $this->belongsTo(SubMarket::class);
}
}

12
app/Models/SubMarket.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SubMarket extends Model
{
/** @use HasFactory<\Database\Factories\SubMarketFactory> */
use HasFactory;
}

48
app/Models/User.php Normal file
View File

@@ -0,0 +1,48 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var list<string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
}