soft delete in a user model relations
This commit is contained in:
parent
190a575993
commit
674f7849cb
|
|
@ -46,7 +46,7 @@ class User extends UserBase
|
|||
*/
|
||||
public $belongsToMany = [
|
||||
'groups' => [UserGroup::class, 'table' => 'users_groups'],
|
||||
'chatrooms' => ['TPS\Birzha\Models\Chatroom', 'table'=>'tps_birzha_chatrooms_users']
|
||||
'chatrooms' => ['TPS\Birzha\Models\Chatroom', 'table'=>'tps_birzha_chatrooms_users', 'delete' => true, 'softDelete' => true]
|
||||
];
|
||||
|
||||
public $attachOne = [
|
||||
|
|
@ -54,9 +54,9 @@ class User extends UserBase
|
|||
];
|
||||
|
||||
public $hasMany = [
|
||||
'products' => ['TPS\Birzha\Models\Product', 'key' => 'vendor_id'],
|
||||
'transactions' => ['TPS\Birzha\Models\Transaction'],
|
||||
'exchangerequests' => ['TPS\Birzha\Models\Exchangerequest'],
|
||||
'products' => ['TPS\Birzha\Models\Product', 'key' => 'vendor_id', 'softDelete' => true],
|
||||
'transactions' => ['TPS\Birzha\Models\Transaction', 'softDelete' => true],
|
||||
'exchangerequests' => ['TPS\Birzha\Models\Exchangerequest', 'softDelete' => true],
|
||||
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue