%%%---------------------------------------------------------------------
%%% create_state定义
%%%---------------------------------------------------------------------
-record(create_state, {
    last_id = 1,                                    %% last_id
    left_num = 0,                                   %% 剩余ID数量
    server_id = 1,                                  %% 服务器id
    id_type = 0                                     %% id类型
}).

-record(create_extra_state, {
    auto_id = 1,                                    %% 自增id
    id_type = 0                                     %% id类型
}).

-record(create_player_state, {
    last_id=1,                                      %% last_id
    server_id=1                                     %% 服务器id
}).

%% 注：批量申请一波ID，用完后才继续申请
-define(EVERY_CREATE_NUM, 100).                     %% 每次生成数量

%%%---------------------------------------------------------------------
%%% id类型定义
%%%---------------------------------------------------------------------

-define (PLAYER_ID_CREATE,                  1).     % 玩家id
-define (GOODS_ID_CREATE,                   2).     % 物品id
-define (GUILD_ID_CREATE,                   3).     % 公会id
-define (AUCTION_ID_CREATE,                 4).     % 拍卖场次id
-define (AUCTION_GOODS_ID_CREATE,           5).     % 拍卖物品id
-define (MAIL_ID_CREATE,                    6).     % 邮件id
-define (SELL_ID_CREATE,                    9).     % 交易id
-define (CHARGE_PAY_NO_CREATE,              10).    % 充值订单号(只用于秘籍)
-define (FLOWER_GIFT_RECORD_ID_CREATE,      11).    % 鲜花送礼记录
-define (RED_ENVELOPES_ID_CREATE,           13).    % 红包id
-define (ORDER_ID_CREATE,                   15).    % 社团派单id
-define (SUPPORT_ID_CREATE,                 16).    % 社团协助id

%% id类型列表
-define(ID_TYPE_LIST, [
        ?PLAYER_ID_CREATE
        ,?GOODS_ID_CREATE
        ,?GUILD_ID_CREATE
        ,?AUCTION_ID_CREATE
        ,?AUCTION_GOODS_ID_CREATE
        ,?SELL_ID_CREATE
        ,?CHARGE_PAY_NO_CREATE
        ,?FLOWER_GIFT_RECORD_ID_CREATE
        ,?RED_ENVELOPES_ID_CREATE
]).
