Micro-ORM/app/Model/Job.php

22 lines
528 B
PHP

<?php
namespace App\Model;
use App\Query\IJobQuery;
use App\Query\JobQuery;
use Fufle\ORM\Model as BaseModel;
class Job extends BaseModel {
//private string $table = 'jobs';
//protected static ?IJobQuery $query;
public int $id;
public float $budget;
public static function Initialize() {
if (static::$query === null) {
static::$query = new JobQuery(self::class);
}
}
public static function GetLast10() {
return self::QueryAll(self::$query->GetLast10());
}
}