<?php

namespace App\Generated\V1_1\DTOs;

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

class ListFriendDTO extends DTO
{
    use ValueHelper;

    protected $list_type;
    protected $friend_level;
    protected $last_at;
    protected $list_unread_msg_cnt;
    protected $last_msg;
    protected $star_at;
    protected $is_blacklist;
    protected $user;

    /**
     * 列表类型
     * @return mixed|null
     */
    public function getList_type()
    {
        return $this->list_type;
    }

    /**
     * 好友等级
     * @return mixed|null
     */
    public function getFriend_level()
    {
        return $this->friend_level;
    }

    /**
     * 最后交互时间
     * @return int
     */
    public function getLast_at()
    {
        return $this->last_at;
    }

    /**
     * 列表未读消息数量
     * @return int
     */
    public function getList_unread_msg_cnt()
    {
        return $this->list_unread_msg_cnt;
    }

    /**
     * 最近聊天消息
     * @return null|null
     */
    public function getLast_msg()
    {
        return $this->last_msg;
    }

    /**
     * 星标时间
     * @return int|null
     */
    public function getStar_at()
    {
        return $this->star_at;
    }

    /**
     * 是否拉黑
     * @return int|null
     */
    public function getIs_blacklist()
    {
        return $this->is_blacklist;
    }

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

    public function setList_type($list_type)
    {
        $this->list_type = $list_type;
    }

    public function setFriend_level($friend_level)
    {
        $this->friend_level = $friend_level;
    }

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

    public function setList_unread_msg_cnt($list_unread_msg_cnt)
    {
        $this->list_unread_msg_cnt = $list_unread_msg_cnt;
    }

    public function setLast_msg($last_msg)
    {
        $this->last_msg = $last_msg;
    }

    public function setStar_at($star_at)
    {
        $this->star_at = $star_at;
    }

    public function setIs_blacklist($is_blacklist)
    {
        $this->is_blacklist = $is_blacklist;
    }

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

    public function getAttributeMap()
    {
        return [
            ['list_type', 'list_type', AllContactsListType::class, Constants::ENUM | Constants::OPTIONAL, null],
            ['friend_level', 'friend_level', FriendLevel::class, Constants::ENUM | Constants::OPTIONAL, null],
            ['last_at', 'last_at', 'bail|integer', Constants::INTEGER, null],
            ['list_unread_msg_cnt', 'list_unread_msg_cnt', 'bail|integer', Constants::INTEGER, null],
            ['last_msg', 'last_msg', 'bail|nullable', null | Constants::OPTIONAL, null],
            ['star_at', 'star_at', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
            ['is_blacklist', 'is_blacklist', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
            ['user', 'user', ContactUserDTO::class, Constants::MODEL | Constants::OPTIONAL, null],
        ];
    }

}
