/** * @inheritdoc */ public function rules() { return [[['ticket_id', 'id', 'user_id'], 'integer'], ['ticket_id', 'exist', 'targetAttribute' => 'id', 'targetClass' => SeasonTicket::className()], [['comment', 'create_at', 'userFullName'], 'safe'], [['current_cost', 'cash', 'bonus_cash'], 'number']]; }
/** * @return \yii\db\ActiveQuery */ public function getTicket() { return $this->hasOne(SeasonTicket::className(), ['id' => 'ticket_id']); }