<?php

namespace app\entity\request\api\store\order;

use app\entity\request\RequestCommonEntity;

class StoreOrderCreateRequestEntity extends RequestCommonEntity
{
    public $cartId = 0;
    public $cartIdList = [];
    public $addressId = 0;
    public $payType = 0;
    public $mark = '';
    public $distributionMode = 0;
    public $fzonePayType = [];
    public $shareId = 0;
    public $uid = 0;

    public function getCartId(): int
    {
        return $this->cartId;
    }

    public function setCartId(int $cartId): StoreOrderCreateRequestEntity
    {
        if(empty($this->getCartIdList())) {
            $this->setCartIdList([$cartId]);
        }
        $this->cartId = $cartId;
        return $this;
    }

    public function getCartIdList(): array
    {
        return $this->cartIdList;
    }

    public function setCartIdList(array $cartIdList): StoreOrderCreateRequestEntity
    {
        $this->cartIdList = $cartIdList;
        return $this;
    }

    public function getAddressId(): int
    {
        return $this->addressId;
    }

    public function setAddressId(int $addressId): StoreOrderCreateRequestEntity
    {
        $this->addressId = $addressId;
        return $this;
    }

    public function getPayType(): int
    {
        return $this->payType;
    }

    public function setPayType(int $payType): StoreOrderCreateRequestEntity
    {
        $this->payType = $payType;
        return $this;
    }

    public function getMark(): string
    {
        return $this->mark;
    }

    public function setMark(string $mark): StoreOrderCreateRequestEntity
    {
        $this->mark = $mark;
        return $this;
    }

    public function getDistributionMode(): int
    {
        return $this->distributionMode;
    }

    public function setDistributionMode(int $distributionMode): StoreOrderCreateRequestEntity
    {
        $this->distributionMode = $distributionMode;
        return $this;
    }

    public function getFzonePayType(): array
    {
        return $this->fzonePayType;
    }

    public function setFzonePayType(array $fzonePayType): StoreOrderCreateRequestEntity
    {
        $this->fzonePayType = $fzonePayType;
        return $this;
    }

    public function getShareId(): int
    {
        return $this->shareId;
    }

    public function setShareId(int $shareId): StoreOrderCreateRequestEntity
    {
        $this->shareId = $shareId;
        return $this;
    }

    /**
     * @return int
     */
    public function getUid(): int
    {
        return $this->uid;
    }

    /**
     * @param int $uid
     * @return StoreOrderCreateRequestEntity
     */
    public function setUid(int $uid): StoreOrderCreateRequestEntity
    {
        $this->uid = $uid;
        return $this;
    }
}