test2
This commit is contained in:
parent
83b1f5abac
commit
2e463b0877
|
@ -12,9 +12,7 @@ class Job extends BaseModel {
|
||||||
public int $id;
|
public int $id;
|
||||||
public float $budget;
|
public float $budget;
|
||||||
public static function Initialize() {
|
public static function Initialize() {
|
||||||
echo "init ";
|
|
||||||
if (static::$query === null) {
|
if (static::$query === null) {
|
||||||
echo "query ";
|
|
||||||
static::$query = new JobQuery(self::class);
|
static::$query = new JobQuery(self::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ class Query {
|
||||||
private string $table;
|
private string $table;
|
||||||
private string $primaryKey;
|
private string $primaryKey;
|
||||||
public function __construct(string $model) {
|
public function __construct(string $model) {
|
||||||
//$model = new $class();
|
|
||||||
$this->table = $model::getTableName();
|
$this->table = $model::getTableName();
|
||||||
$this->primaryKey = $model::getPrimaryKey();
|
$this->primaryKey = $model::getPrimaryKey();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,4 +12,8 @@ echo "
|
||||||
var_dump(Job::Get(10));
|
var_dump(Job::Get(10));
|
||||||
echo "
|
echo "
|
||||||
|
|
||||||
|
";
|
||||||
|
var_dump(Job::GetLast10())
|
||||||
|
echo "
|
||||||
|
|
||||||
";
|
";
|
Loading…
Reference in New Issue