Micro-ORM/app/Model/JobModel.php

22 lines
520 B
PHP

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