<?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="edu.whut.smilepicturebackend.mapper.PictureMapper">

    <resultMap id="BaseResultMap" type="edu.whut.smilepicturebackend.model.entity.Picture">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="originalUrl" column="original_url" jdbcType="VARCHAR"/>
            <result property="url" column="url" jdbcType="VARCHAR"/>
            <result property="thumbnailUrl" column="thumbnail_url" jdbcType="VARCHAR"/>
            <result property="name" column="name" jdbcType="VARCHAR"/>
            <result property="introduction" column="introduction" jdbcType="VARCHAR"/>
            <result property="category" column="category" jdbcType="VARCHAR"/>
            <result property="tags" column="tags" jdbcType="VARCHAR"/>
            <result property="picSize" column="pic_size" jdbcType="BIGINT"/>
            <result property="picWidth" column="pic_width" jdbcType="INTEGER"/>
            <result property="picHeight" column="pic_height" jdbcType="INTEGER"/>
            <result property="picScale" column="pic_scale" jdbcType="DOUBLE"/>
            <result property="picFormat" column="pic_format" jdbcType="VARCHAR"/>
            <result property="picColor" column="pic_color" jdbcType="VARCHAR"/>
            <result property="userId" column="user_id" jdbcType="BIGINT"/>
            <result property="spaceId" column="space_id" jdbcType="BIGINT"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="editTime" column="edit_time" jdbcType="TIMESTAMP"/>
            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
            <result property="isDelete" column="is_delete" jdbcType="TINYINT"/>
            <result property="reviewStatus" column="reviewStatus" jdbcType="INTEGER"/>
            <result property="reviewMessage" column="reviewMessage" jdbcType="VARCHAR"/>
            <result property="reviewerId" column="reviewerId" jdbcType="BIGINT"/>
            <result property="reviewTime" column="reviewTime" jdbcType="TIMESTAMP"/>
    </resultMap>

    <sql id="Base_Column_List">
        id,url,thumbnailUrl,name,
        introduction,category,tags,
        picSize,picWidth,picHeight,
        picScale,picFormat,userId,spaceId,
        createTime,editTime,updateTime,
        isDelete,reviewStatus,reviewMessage,
        reviewerId,reviewTime
    </sql>
</mapper>
