package com.zhongshu.card.client.service.org;

import com.github.microservice.auth.security.type.AuthType;
import com.github.microservice.net.ResultContent;
import com.zhongshu.card.client.model.org.*;
import com.zhongshu.card.client.model.project.ProjectSaveParam;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface OrganizationService {

    /**
     * 保存项目信息
     *
     * @param param
     * @return
     */
    ResultContent saveProjectInfo(ProjectSaveParam param);

    /**
     * 当前用户能 查看的项目列表
     *
     * @param param
     * @param pageable
     * @return
     */
    ResultContent<Page<ProjectOrgModel>> pageProject(OrganizationSearchParam param, Pageable pageable);

    /**
     * 得到项目详情
     * @param oid
     * @return
     */
    ResultContent<ProjectOrgModel> getProjectDetail(String oid);

    ResultContent  deleteProject(String oid);

    // 查询可用的项目列表
    ResultContent<List<OrganizationSimpleModel>> getProjectList();

    /**
     * 通用添加结构信息
     *
     * @param param
     * @return
     */
    ResultContent addOrganization(OrganizationAddParam param);

    /**
     * 编辑项目
     *
     * @param param
     * @return
     */
    ResultContent updateProject(ProjectUpdateParam param);

    /**
     * 通用编辑机构
     *
     * @param param
     * @return
     */
    ResultContent update(OrganizationUpdateParam param);

    // 添加学校
    ResultContent addSchool(SchoolAddParam param);

    // 得到平台管理端的数据
    ResultContent<OrganizationModel> getPlatformInfo();

    // 编辑学校
    ResultContent updateSchool(SchoolUpdateParam param);

    // 查询结构详情
    ResultContent<OrganizationSimpleModel> getDetail(String oid);

    // 得到学校详情
    ResultContent<OrganizationModel> getSchoolDetail(String schoolOid);

    // 得到学校所在的项目信息
    ResultContent<ProjectOrgModel> getSchoolProjectDetail(String schoolOid);

    // 得到商户详情
    ResultContent<OrganizationModel> getBusinessMainDetail(String businessMainOid);

    // 删除机构信息
    ResultContent deleteOrganization(String oid);

    // 得到oid关联的结构信息
    OidAboutInfo getOidAboutOrgInfo(String oid);

    ResultContent<List<OrganizationSimpleModel>> list(OrganizationSearchParam param);

    ResultContent<Page<OrganizationModel>> page(OrganizationSearchParam param, Pageable pageable);

    ResultContent<OrganizationModel> getOrgDetail(String oid);

    ResultContent<List<OrganizationModel>> getUserOrgList(OrganizationUserSearch param);

    ResultContent buildCode(AuthType authType);

    ResultContent initSuperOrganization();

}
