use serde::{Deserialize, Serialize};
use sqlx::FromRow;

#[derive(Debug, Serialize, Deserialize, FromRow)]
#[serde(rename_all = "PascalCase")]
#[sqlx(rename_all = "PascalCase")]
pub struct UserInfo {
    #[sqlx(rename = "Index")]
    pub index: i64,
    #[sqlx(rename = "Uid")]
    pub uid: i64,
    #[sqlx(rename = "OwnerIndex")]
    pub owner_index: Option<i64>,
    #[sqlx(rename = "UserId")]
    pub user_id: Option<String>,
    #[sqlx(rename = "UserKey")]
    pub user_key: Option<String>,
    #[sqlx(rename = "LastPlayPackId")]
    pub last_play_pack_id: Option<i32>,
    #[sqlx(rename = "InvenSlot")]
    pub inven_slot: Option<i32>,
    #[sqlx(rename = "StorageSlot")]
    pub storage_slot: Option<i32>,
    #[sqlx(rename = "Gold")]
    pub gold: Option<i64>,
    #[sqlx(rename = "FreeJewelry")]
    pub free_jewelry: Option<i64>,
    #[sqlx(rename = "Jewelry")]
    pub jewelry: Option<i64>,
    #[sqlx(rename = "EquipSlot")]
    pub equip_slot: Option<i32>,
    #[sqlx(rename = "Catalyst")]
    pub catalyst: Option<i64>,
    #[sqlx(rename = "Exp")]
    pub exp: Option<i32>,
    #[sqlx(rename = "LevelReward")]
    pub level_reward: Option<i32>,
    #[sqlx(rename = "PortraitCostumeId")]
    pub portrait_costume_id: Option<i32>,
    #[sqlx(rename = "EquipStorageSlot")]
    pub equip_storage_slot: Option<i32>,
    #[sqlx(rename = "PvpTicket")]
    pub pvp_ticket: Option<i32>,
    #[sqlx(rename = "Medal")]
    pub medal: Option<i32>,
    #[sqlx(rename = "EvilCastleCoin")]
    pub evil_castle_coin: Option<i32>,
    #[sqlx(rename = "UserType")]
    pub user_type: Option<i32>,
    #[sqlx(rename = "FreeHuntingAp")]
    pub free_hunting_ap: Option<i32>,
    #[sqlx(rename = "BonusHuntingAp")]
    pub bonus_hunting_ap: Option<i32>,
    #[sqlx(rename = "PvpTicketStack")]
    pub pvp_ticket_stack: Option<i32>,
    #[sqlx(rename = "Mileage")]
    pub mileage: Option<i32>,
    #[sqlx(rename = "HopePowder")]
    pub hope_powder: Option<i32>,
    #[sqlx(rename = "UnregDate")]
    pub unreg_date: Option<i64>,
    #[sqlx(rename = "PurchaseCountInfoIndex")]
    pub purchase_count_info_index: Option<String>,
    #[sqlx(rename = "IsFirstGacha")]
    pub is_first_gacha: Option<bool>,
    #[sqlx(rename = "PresetSlot")]
    pub preset_slot: Option<i32>,
    #[sqlx(rename = "OptimizeInfoIndex")]
    pub optimize_info_index: Option<String>,
    #[sqlx(rename = "BlockDate")]
    pub block_date: Option<i64>,
    #[sqlx(rename = "ReturnStatusEndTime")]
    pub return_status_end_time: Option<i64>,
    #[sqlx(rename = "MyRoomSlot")]
    pub my_room_slot: Option<i32>,
    #[sqlx(rename = "TotalWarPresetSlot")]
    pub total_war_preset_slot: Option<i32>,
    #[sqlx(rename = "EventApFree")]
    pub event_ap_free: Option<i32>,
    #[sqlx(rename = "EventApStack")]
    pub event_ap_stack: Option<i32>,
    #[sqlx(rename = "FreeTorchLightAp")]
    pub free_torch_light_ap: Option<i32>,
    #[sqlx(rename = "TorchLightAp")]
    pub torch_light_ap: Option<i32>,
    #[sqlx(rename = "JoinTime")]
    pub join_time: Option<i64>,
    #[sqlx(rename = "NewbiePassStep")]
    pub newbie_pass_step: Option<i32>,
    #[sqlx(rename = "BlockReason")]
    pub block_reason: Option<i32>,
    #[sqlx(rename = "RogueLikeAp")]
    pub rogue_like_ap: Option<i32>,
    #[sqlx(rename = "RogueLikeApStack")]
    pub rogue_like_ap_stack: Option<i32>,
    #[sqlx(rename = "LoginDate")]
    pub login_date: Option<i64>,
    #[sqlx(rename = "GuildCoin")]
    pub guild_coin: Option<i64>,
    #[sqlx(rename = "CafeteriaCoin")]
    pub cafeteria_coin: Option<i64>,
    #[sqlx(rename = "DatingApFree")]
    pub dating_ap_free: Option<i32>,
    #[sqlx(rename = "DatingApStack")]
    pub dating_ap_stack: Option<i32>,
    #[sqlx(rename = "MiniGameCoin")]
    pub mini_game_coin: Option<i64>,
    #[sqlx(rename = "CanCharAutoRevive")]
    pub can_char_auto_revive: Option<bool>,
    #[sqlx(rename = "AutoReviveCastingCharInvenIndex")]
    pub auto_revive_casting_char_inven_index: Option<i64>,
    #[sqlx(rename = "RecommendDeckUserOptionInfoIndex")]
    pub recommend_deck_user_option_info_index: Option<i64>,
    #[sqlx(rename = "MonsterHuntPresetSlot")]
    pub monster_hunt_preset_slot: Option<i32>,
    #[sqlx(rename = "GuildRaidPresetSlot")]
    pub guild_raid_preset_slot: Option<i32>,
    #[sqlx(rename = "MyRoomDecoCoin")]
    pub my_room_deco_coin: Option<i64>,
    #[sqlx(rename = "PortraitCostumeDesignId")]
    pub portrait_costume_design_id: Option<i32>,
}
