package com.alttd.altitudeweb.database.web_db.forms;

import org.apache.ibatis.annotations.*;

import java.util.UUID;

public interface StaffApplicationMapper {

    @Insert("""
            INSERT INTO staff_applications (
                id, uuid, email, age, discord_username, meets_requirements, pronouns, join_date,
                weekly_playtime, available_days, available_times, previous_experience, plugin_experience,
                moderator_expectations, additional_info, created_at, send_at, assigned_to
            ) VALUES (
                #{id}, #{uuid}, #{email}, #{age}, #{discordUsername}, #{meetsRequirements}, #{pronouns}, #{joinDate},
                #{weeklyPlaytime},
                #{availableDays},
                #{availableTimes}, #{previousExperience}, #{pluginExperience},
                #{moderatorExpectations}, #{additionalInfo}, #{createdAt}, #{sendAt}, #{assignedTo}
            )
            """)
    void insert(StaffApplication application);

    @Update("""
            UPDATE staff_applications SET send_at = NOW()
            WHERE id = #{id}
            """)
    void markAsSent(@Param("id") UUID id);
}
