<?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="cn.edu.whu.boot.allocation.mapper.DraftMapper">

    <resultMap id="draftResultMap" type="cn.edu.whu.boot.allocation.entities.Draft">
        <id column="id" property="iD"/>
        <result column="username" property="userName"/>
        <result column="draw_time" property="date"/>
        <result column="shape" property="shape"/>
    </resultMap>

    <insert id="insert">
        INSERT INTO ${databaseName}."draft"(collector_id, username,draw_time,shape)
        VALUES (#{draft.collectorId}, #{draft.userName},to_timestamp(#{draft.date},'YYYY-MM-DD HH24:MI:SS'),#{draft.shape})
    </insert>
</mapper>