<?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.example.system.mapper.ArticleMapper">

    <insert id="createArticle" useGeneratedKeys="true" keyProperty="articleId">
        insert into article_table
            (user_id, article_title, brief_content,
            article_content, article_type, competition_id, publish_time)
        values
            (#{userId}, #{articleTitle}, #{briefContent},
             #{articleContent}, #{articleType}, #{competitionId}, #{publishTime});
    </insert>

</mapper>