<?php

namespace App\Generated\V1_1\DTOs;

use Kamicloud\StubApi\Concerns\ValueHelper;
use Kamicloud\StubApi\DTOs\DTO;
use Kamicloud\StubApi\Utils\Constants;
use App\Generated\V1_1\DTOs\ContactUserDTO;

class ListFriendApplyDTO extends DTO
{
    use ValueHelper;

    protected $uid;
    protected $apply_uid;
    protected $last_at;
    protected $is_unread;
    protected $handle;
    protected $user;

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

    /**
     * 接收者uid
     * @return int
     */
    public function getApply_uid()
    {
        return $this->apply_uid;
    }

    /**
     * 邀请的时间
     * @return int
     */
    public function getLast_at()
    {
        return $this->last_at;
    }

    /**
     * 是否有未读消息
     * @return null
     */
    public function getIs_unread()
    {
        return $this->is_unread;
    }

    /**
     * 处理结果
     * @return int
     */
    public function getHandle()
    {
        return $this->handle;
    }

    /**
     * 联系人信息
     * @return ContactUserDTO|null
     */
    public function getUser()
    {
        return $this->user;
    }

    public function setUid($uid)
    {
        $this->uid = $uid;
    }

    public function setApply_uid($apply_uid)
    {
        $this->apply_uid = $apply_uid;
    }

    public function setLast_at($last_at)
    {
        $this->last_at = $last_at;
    }

    public function setIs_unread($is_unread)
    {
        $this->is_unread = $is_unread;
    }

    public function setHandle($handle)
    {
        $this->handle = $handle;
    }

    public function setUser($user)
    {
        $this->user = $user;
    }

    public function getAttributeMap()
    {
        return [
            ['uid', 'uid', 'bail|integer', Constants::INTEGER, null],
            ['apply_uid', 'apply_uid', 'bail|integer', Constants::INTEGER, null],
            ['last_at', 'last_at', 'bail|integer', Constants::INTEGER, null],
            ['is_unread', 'is_unread', 'bail', null, null],
            ['handle', 'handle', 'bail|integer', Constants::INTEGER, null],
            ['user', 'user', ContactUserDTO::class, Constants::MODEL | Constants::OPTIONAL, null],
        ];
    }

}
