This commit is contained in:
Michał Sieciechowicz 2021-02-28 01:06:51 +01:00
parent 83b1f5abac
commit 2e463b0877
3 changed files with 4 additions and 3 deletions

View File

@ -12,9 +12,7 @@ class Job extends BaseModel {
public int $id;
public float $budget;
public static function Initialize() {
echo "init ";
if (static::$query === null) {
echo "query ";
static::$query = new JobQuery(self::class);
}
}

View File

@ -5,7 +5,6 @@ class Query {
private string $table;
private string $primaryKey;
public function __construct(string $model) {
//$model = new $class();
$this->table = $model::getTableName();
$this->primaryKey = $model::getPrimaryKey();
}

View File

@ -12,4 +12,8 @@ echo "
var_dump(Job::Get(10));
echo "
";
var_dump(Job::GetLast10())
echo "
";