mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-15 16:44:04 +00:00
Remove some todos
This commit is contained in:
parent
dc540f3b10
commit
b0d119753d
6 changed files with 11 additions and 20 deletions
|
|
@ -6,25 +6,16 @@ namespace Stancl\Tenancy;
|
|||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
// todo move this to a database driver domain?
|
||||
|
||||
/**
|
||||
* @internal Class is subject to breaking changes in minor and patch versions.
|
||||
*/
|
||||
class TenantModel extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
protected $primaryKey = 'uuid';
|
||||
protected $primaryKey = 'id';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Decoded data from the data column.
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
private $dataObject;
|
||||
|
||||
public static function dataColumn()
|
||||
{
|
||||
return config('tenancy.storage.db.data_column', 'data');
|
||||
|
|
@ -87,10 +78,13 @@ class TenantModel extends Model
|
|||
return $this->attributes[$key] ?? $this->getFromData($key) ?? null;
|
||||
}
|
||||
|
||||
/** @todo In v2, this should return an associative array. */
|
||||
public function getMany(array $keys): array
|
||||
{
|
||||
return \array_map([$this, 'get'], $keys);
|
||||
return array_reduce($keys, function ($result, $key) {
|
||||
$result[$key] = $this->get[$key];
|
||||
|
||||
return $result;
|
||||
}, []);
|
||||
}
|
||||
|
||||
public function put(string $key, $value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue