/**
* 文件：ConfigFieldController.java
* 版本：1.0.0
* 日期：
* Copyright &reg; 
* All right reserved.
*/
package com.mortals.xhx.module.config.web;

import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.common.code.YesNo;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonMappingController;
import com.mortals.xhx.module.config.model.ConfigFieldEntity;
import com.mortals.xhx.module.config.service.ConfigFieldService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * <p>
 * Title: 字段配置
 * </p>
 * <p>
 * Description: ConfigFieldController
 * </p>
 * <p>
 * Copyright: Copyright &reg;
 * </p>
 * <p>
 * Company:
 * </p>
 * 
 * @author
 * @version 1.0.0
 */
@RestController
@RequestMapping("config/field")
public class ConfigFieldController
		extends BaseCRUDJsonMappingController<ConfigFieldService, ConfigFieldForm, ConfigFieldEntity, Long> {

	public ConfigFieldController() {
		super.setFormClass(ConfigFieldForm.class);
		super.setModuleDesc("字段配置");
	}

	@Override
	protected void init(HttpServletRequest request, HttpServletResponse response, ConfigFieldForm form,
			Map<String, Object> model, Context context) {

		this.addDict(model, "enabled", IBaseEnum.getEnumMap(YesNo.class));
		super.init(request, response, form, model, context);
	}
}