<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.testor.module.hazard.dao.TContractorAccessLogDao">
    <!-- 开启二级缓存 -->
    <!-- <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/> -->

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.testor.module.hazard.model.domain.TContractorAccessLog">
        <id column="id" property="id"/>
        <result column="contractor_allow_id" property="contractorAllowId"/>
        <result column="person_name" property="personName"/>
        <result column="gender" property="gender"/>
        <result column="id_card_no" property="idCardNo"/>
        <result column="age" property="age"/>
        <result column="job_nature_id" property="jobNatureId"/>
        <result column="job_nature" property="jobNature"/>
        <result column="job_title_id" property="jobTitleId"/>
        <result column="job_title" property="jobTitle"/>
        <result column="tel" property="tel"/>
        <result column="status" property="status"/>
        <result column="org_id" property="orgId"/>
        <result column="tools_name" property="toolsName"/>
        <result column="tools_type_id" property="toolsTypeId"/>
        <result column="tools_type" property="toolsType"/>
        <result column="tools_model" property="toolsModel"/>
        <result column="tools_num" property="toolsNum"/>
        <result column="tools_purpose" property="toolsPurpose"/>
        <result column="tools_is_pass" property="toolsIsPass"/>
        <result column="material_name" property="materialName"/>
        <result column="material_type_id" property="materialTypeId"/>
        <result column="material_type" property="materialType"/>
        <result column="risk_id" property="riskId"/>
        <result column="risk" property="risk"/>
        <result column="material_model" property="materialModel"/>
        <result column="material_num" property="materialNum"/>
        <result column="material_purpose" property="materialPurpose"/>
        <result column="equipment_name" property="equipmentName"/>
        <result column="type_id" property="typeId"/>
        <result column="equipment_type" property="equipmentType"/>
        <result column="is_general" property="isGeneral"/>
        <result column="equipment_model" property="equipmentModel"/>
        <result column="equipment_num" property="equipmentNum"/>
        <result column="equipment_purpose" property="equipmentPurpose"/>
        <result column="batch" property="batch"/>
        <result column="remarks" property="remarks"/>
        <result column="type" property="type"/>
        <result column="historical_content" property="historicalContent"/>

        <!-- 继承父类的字段 -->
        <result column="create_by" property="createBy"/>
        <result column="create_date" property="createDate"/>
        <result column="update_by" property="updateBy"/>
        <result column="update_date" property="updateDate"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, contractor_allow_id, person_name, gender, id_card_no, age, job_nature_id, job_nature,
        job_title_id, job_title, tel, status, org_id, tools_name, tools_type_id, tools_type,
        tools_model, tools_num, tools_purpose, tools_is_pass, material_name, material_type_id,
        material_type, risk_id, risk, material_model, material_num, material_purpose,
        equipment_name, type_id, equipment_type, is_general, equipment_model, equipment_num,
        equipment_purpose, batch, remarks, create_by, create_date, update_by, update_date,
        del_flag, remark
    </sql>

</mapper>