- Add relation data binding in model construction - Update model template to include new relation construction logic - Remove unused index method template
25 lines
420 B
Plaintext
25 lines
420 B
Plaintext
<?php
|
|
|
|
namespace {{modelNamespace}};
|
|
|
|
use app\common\model\TimeModel;
|
|
|
|
class {{modelName}} extends TimeModel
|
|
{
|
|
|
|
protected $name = "{{table}}";
|
|
|
|
protected $table = "{{prefix_table}}";
|
|
|
|
protected $deleteTime = {{deleteTime}};
|
|
|
|
public array $notes = {{selectArrays}};
|
|
|
|
public function __construct(object|array $data = [])
|
|
{
|
|
parent::__construct($data);
|
|
|
|
{{constructRelation}}
|
|
}
|
|
|
|
} |