Micro-ORM/app/Model/Job.php

19 lines
417 B
PHP
Raw Normal View History

2021-02-27 23:04:16 +00:00
<?php
2021-03-01 15:06:02 +00:00
namespace Fufle\Demo\Model;
2021-02-27 23:04:16 +00:00
2021-03-01 15:06:02 +00:00
use Fufle\Demo\Query\IJobQuery;
use Fufle\Demo\Query\JobQuery;
2021-02-27 23:04:16 +00:00
use Fufle\ORM\Model as BaseModel;
2021-02-28 00:04:44 +00:00
class Job extends BaseModel {
2021-02-27 23:04:16 +00:00
public int $id;
public float $budget;
2021-03-01 15:06:02 +00:00
public static function QueryModel() {
return new JobQuery( static::class );
2021-02-27 23:04:16 +00:00
}
2021-03-01 15:06:02 +00:00
2021-02-27 23:04:16 +00:00
public static function GetLast10() {
2021-03-01 15:06:02 +00:00
return self::QueryAll(self::QueryModel()->GetLast10());
2021-02-27 23:04:16 +00:00
}
}