format('Y-m-d H:i:s'); } public function __construct(array $attributes = []) { parent::__construct($attributes); $this->setTable(plugin()->webman->config('database.qrcode_owner_table')); } public function qrcode_batch(): hasMany { return $this->hasMany(plugin()->webman->config('database.qrcode_batch_model'), 'owner_id'); } public function qrcode(): hasManyThrough { return $this->hasManyThrough(plugin()->webman->config('database.qrcode_model'), plugin()->webman->config('database.qrcode_batch_model'), 'owner_id', 'batch_id'); } }