<?php

namespace App\Generated\Controllers\V1;

use App\Generated\V1\Messages\SignIn\SignMessage;
use App\Http\Services\V1\SignInService;
use App\Generated\V1\Messages\SignIn\RewardUnLookCardMessage;
use App\Generated\V1\Messages\SignIn\TodayMessage;
use App\Generated\V1\Messages\SignIn\Reward72PairCouponMessage;
use App\Generated\V1\Messages\SignIn\RewardPopularityMessage;
use App\Http\Controllers\Controller;
use App\Generated\V1\Messages\SignIn\RewardSupVipCouponMessage;
use App\Generated\V1\Messages\SignIn\RewardFlowerMessage;
use DB;
use App\Generated\V1\Messages\SignIn\Reward72DiscountCouponMessage;

class SignInController extends Controller
{
    public $handler;

    public function __construct(SignInService $handler)
    {
        $this->handler = $handler;
    }

    public function reward72PairCoupon(Reward72PairCouponMessage $message)
    {
        $message->validateInput();
        $this->handler->reward72PairCoupon($message);
        $message->validateOutput();
        return $message->getResponse();
    }

    public function reward72DiscountCoupon(Reward72DiscountCouponMessage $message)
    {
        $message->validateInput();
        $this->handler->reward72DiscountCoupon($message);
        $message->validateOutput();
        return $message->getResponse();
    }

    public function rewardSupVipCoupon(RewardSupVipCouponMessage $message)
    {
        $message->validateInput();
        $this->handler->rewardSupVipCoupon($message);
        $message->validateOutput();
        return $message->getResponse();
    }

    public function rewardUnLookCard(RewardUnLookCardMessage $message)
    {
        $message->validateInput();
        $this->handler->rewardUnLookCard($message);
        $message->validateOutput();
        return $message->getResponse();
    }

    public function rewardPopularity(RewardPopularityMessage $message)
    {
        $message->validateInput();
        $this->handler->rewardPopularity($message);
        $message->validateOutput();
        return $message->getResponse();
    }

    public function rewardFlower(RewardFlowerMessage $message)
    {
        $message->validateInput();
        $this->handler->rewardFlower($message);
        $message->validateOutput();
        return $message->getResponse();
    }

    public function sign(SignMessage $message)
    {
        $message->validateInput();
        $this->handler->sign($message);
        $message->validateOutput();
        return $message->getResponse();
    }

    public function today(TodayMessage $message)
    {
        $message->validateInput();
        $this->handler->today($message);
        $message->validateOutput();
        return $message->getResponse();
    }

}
