Daily Archive: July 13, 2018

在公有云中,系统要同时服务于多个租户,多个租户共用一个数据库,因此,需要实现多租户的逻辑隔离,即在数据库的每张表中皆存在租户ID字段 0

Under Yii 2, realize the logical isolation of multi-tenant, that is, there is a tenant ID field in each table of the database, customize the active query class, and add the query conditions of the tenant ID by default in each query.

Post Views: 11 1. Dynamic configuration of database connection in Yii 2 Starter Kit, the configuration attribute comes from the multi-tenant system,https://www.shuijingwanwq.com/2018/01/18/2328/, multi-tenant physical isolation implementation 2. In the public cloud, the system should...

POST http://api.pcs-api.localhost/v1/config-columns?login_id=e56db1b43546a110431ac38409ed8e9e&login_tid=ccffd87b68171e8cb6c19f4bb8ccd775 ,422响应 0

Under Yii 2,[[yii\validators\UniqueValidator|unique(唯一性)]], uniqueness of the combined field, customizing the error message in the common model logic layer

Post Views: 15 1. The model class file in the /common/models directory is only allowed to be generated by the GII tool, which is the common model data layer, \common\models\configcolumn.php, the relevant verification rules...