1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace think\model;
- use think\Model;
- class Pivot extends Model
- {
-
- public $parent;
- protected $autoWriteTimestamp = false;
-
- public function __construct(Model $parent = null, $data = [], $table = '')
- {
- $this->parent = $parent;
- if (is_null($this->name)) {
- $this->name = $table;
- }
- parent::__construct($data);
- $this->class = $this->name;
- }
- }
|