|
- <?php
-
-
-
- namespace common\logic\User\UserUserGroup\Model;
-
- use common\logic\PointSale\PointSale\Model\PointSale;
- use Yii;
- use common\components\ActiveRecordCommon ;
-
-
- class UserUserGroup extends ActiveRecordCommon
- {
-
-
- public static function tableName()
- {
- return 'user_user_group';
- }
-
-
-
- public function rules()
- {
- return [
- [['id_user', 'id_user_group'], 'required'],
- [['id_user', 'id_user_group'], 'integer'],
- ];
- }
-
-
-
- public function attributeLabels()
- {
- return [
- 'id_user' => 'Utilisateur',
- 'id_user_group' => 'Groupe'
- ];
- }
-
- public function getPointSale()
- {
- return $this->hasOne(PointSale::class, ['id' => 'id_point_sale']);
- }
-
- public function populatePointSale(PointSale $pointSale): void
- {
- $this->populateFieldObject('id_point_sale', 'pointSale', $pointSale);
- }
- }
|