package com.iotechn.unimall.admin.api.sys;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.model.Page;
import com.iotechn.unimall.data.domain.CountryDO;
import com.iotechn.unimall.data.dto.CountryDTO;

/**
 * Generate Code By Unimall
 */
@HttpOpenApi(group = "admin.country", description = "unimall_countryService")
public interface CountryService {

    @HttpMethod(description = "删除", permission = "country:country:delete", permissionParentName = "其他", permissionName = "Country")
    public boolean delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "id") Long id) throws ServiceException;


    @HttpMethod(description = "查询", permission = "country:country:list", permissionParentName = "其他", permissionName = "Country")
    public Page<CountryDO> list(
            @HttpParam(name = "CountryDTO", type = HttpParamType.COMMON, description = "CountryDTO") CountryDTO selectDTO,
            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit) throws ServiceException;

    @HttpMethod(description = "添加", permission = "country:country:create", permissionParentName = "其他", permissionName = "Country")
    public CountryDO create(
            @HttpParam(name = "CountryDTO", type = HttpParamType.COMMON, description = "CountryDTO") CountryDTO insertDTO) throws ServiceException;

    @HttpMethod(description = "编辑", permission = "country:country:edit", permissionParentName = "其他", permissionName = "Country")
    public String edit(
            @HttpParam(name = "CountryDTO", type = HttpParamType.COMMON, description = "CountryDTO") CountryDTO editDTO) throws ServiceException;

    }