/*
 *========================================================================
 *
 *   시스템명 : AZN_PLAZA_LANE APP
 *   파 일 명 : file_nm.h
 *   작 성 자 : JBY (baarong@neighbor21.co.kr)
 *   작 성 일 : 2018.07.13
 *   수 정 일 : 
 *   설    명 : File Name 정의서 구조체 배열/ 화일설명,화일명,
               화일명 작성(TAIL),DIRECTORY 위치,RECORD LENGTH/SAM KEY struct
 *
 *========================================================================
*/

#ifndef    _FILE_NM
#define    _FILE_NM

#include <file_ctrl.h>
#include "key_info.h"
#include "def_set.h"
#include "dir_path.h"
#include "passraw.h"
#include "rpr_spec.h"
#include "cls_lane.h"
#include "wrk_stat.h"
#include "lane_stat_info.h"
#include "errlog.h"
#include "bas_tbl.h"
#include "holi_tbl.h"
#include "wrkr_info.h"
#include "tbl_dump.h"
#include "bl_mst.h"
#include "bl_chg.h"
#include "lane_rmot_stat.h"       /* 원격차로 상태          */
#include "iss_comp.h"             /* 유지보수데이터         */
#include "pl_chg.h"
#include "pl_mst.h"
#include "pl_read.h"
#include "imm_carno_info.h"
#include "imm_card_info.h"
#include "bef_mst.h"
#include "bef_chg.h"
#include "red_carno_info.h"
#include "nonpay_info.h"
#include "imsi_bl.h"

#define SIZE(x) sizeof( struct x )

struct file_nm {
    char    file_info[32];      /* 화일설명                 */
    char    file_nm[16];        /* 화일명                   */
    char    file_tail;          /* 화일명 작성(TAIL)        */
    char    dir_location;       /* DIRECTORY 위치           */
    int     rec_leng;           /* RECORD LENGTH            */
    struct  keydesc *keys;      /* SAM KEY struct           */
};

/* ftbl.tail */
#define    TF_NONE               0
#define    TF_WRKR_NO            1    /* 근무자번호         */
#define    TF_DATE               2    /* YYYYMMDDHH         */
#define    TF_PLZ_WRKR_NO        3    /* 영업소근무자번호   */
#define    TF_PLZ_NO             4    /* 영업소번호         */

/* ftbl.dirf */
#define    DF_BASE            0
#define    DF_DATA            1
#define    DF_DATE            2
#define    DF_YEAR_MON        3
#define    DF_YEAR            4
#define    DF_REDO            5
#define    DF_TMP             6

static struct    file_nm file_nm[] = {
/*000*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*001*/ { "통행원시"           , "PASSRAW"     ,   TF_PLZ_WRKR_NO,  DF_DATE,            SIZE(passraw),            passraw_key },
/*002*/ { "단말수신"           , "TERMRECV"    ,   TF_PLZ_WRKR_NO,  DF_DATE,           SIZE(trmn_rcv),           trmn_rcv_key },
/*003*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*004*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*005*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*006*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*007*/ { "폐쇄차로통행명세"   , "CLSPASSSPEC" ,          TF_NONE,  DF_DATE,      SIZE(cls_lane_spec),      cls_lane_spec_key },
/*008*/ { "근무상태정보"       , "WRKSTINFO"   ,          TF_NONE,  DF_DATE,      SIZE(wrk_stat_info),      wrk_stat_info_key },
/*009*/ { "차로상태정보"       , "LANESTATINFO",          TF_NONE,  DF_BASE,     SIZE(lane_stat_info),     lane_stat_info_key },
/*010*/ { "보수정보명세"       , "RPRINFOSPEC" ,          TF_NONE,  DF_DATE,      SIZE(rpr_info_spec),      rpr_info_spec_key },
/*011*/ { "기초사항테이블"     , "BASICTBL"    ,        TF_PLZ_NO,  DF_BASE,          SIZE(basic_tbl),          basic_tbl_key },
/*012*/ { "근무자인적테이블"   , "WRKERTBL"    ,          TF_NONE,  DF_BASE, SIZE(wrkr_personal_info), wrkr_personal_info_key },/**/
/*013*/ { "휴일정보테이블"     , "HOLITBL"     ,          TF_NONE,  DF_BASE,          SIZE(holi_info),          holi_info_key },
/*014*/ { "발행사테이블"       , "ISSTBL"      ,          TF_NONE,  DF_BASE,       SIZE(iss_comp_tbl),       iss_comp_tbl_key },
/*015*/ { "차량번호면제테이블" , "IMMCARNO"    ,          TF_NONE,  DF_BASE,     SIZE(imm_carno_info),     imm_carno_info_key },
/*016*/ { "RFID면제테이블"     , "IMMRFID"     ,          TF_NONE,  DF_BASE,      SIZE(imm_card_info),      imm_card_info_key },
/*017*/ { "사전등록마스터"     , "ADVMST"      ,          TF_NONE,  DF_BASE,        SIZE(bef_mst_tbl),        bef_mst_tbl_key },
/*018*/ { "교통카드PL"         , "BEFMST" ,          TF_NONE,  DF_BASE,         SIZE(pl_mst_tbl),         pl_mst_tbl_key },
/*019*/ { "BL마스터"           , "TPCARDMST"   ,          TF_NONE,  DF_BASE,         SIZE(bl_mst_tbl),         bl_mst_tbl_key },
/*020*/ { "차량번호감면테이블" , "REDCARNO"    ,          TF_NONE,  DF_BASE,     SIZE(red_carno_info),     red_carno_info_key },
/*021*/ { "사전등록변경분"     , "ADVCHG"      ,          TF_NONE,  DF_BASE,        SIZE(bef_chg_tbl),        bef_chg_tbl_key },
/*022*/ { "교통카드마스터"     , "BEFCHG" ,          TF_NONE,  DF_BASE,         SIZE(pl_mst_tbl),         pl_mst_tbl_key },
/*023*/ { "BL변경분"           , "TPCARDCHG"   ,          TF_NONE,  DF_BASE,         SIZE(bl_chg_tbl),         bl_chg_tbl_key },
/*024*/ { "차량번호면제C"      , "IMMCARNOC"   ,          TF_NONE,  DF_BASE,     SIZE(imm_carno_info),     imm_carno_info_key },
/*025*/ { "RFID면제C"          , "IMMRFIDC"    ,          TF_NONE,  DF_BASE,      SIZE(imm_card_info),      imm_card_info_key },
/*026*/ { "에러 로그"          , "ERRLOG"      ,          TF_NONE,  DF_DATE,          SIZE(error_log),          error_log_key },
/*027*/ { "REDO LOG"           , ""            ,          TF_DATE,  DF_REDO,          SIZE(chg_struc),          chg_struc_key },
/*028*/ { "차량번호감면C"      , "REDCARNOC"   ,          TF_NONE,  DF_BASE,     SIZE(red_carno_info),     red_carno_info_key },
/*029*/ { "미납조회용"         , "MINAPMST"    ,          TF_NONE,  DF_BASE,        SIZE(nonpay_info),        nonpay_info_key },
/*030*/ { "전송용PL"           , "PLTPCARDMST" ,          TF_NONE,  DF_BASE,        SIZE(pl_read_tbl),            pl_read_key },
/*031*/ { "기초사항테이블"     , "BASICTBL"    ,        TF_PLZ_NO,  DF_DATA,      SIZE(tbl_dump_file),          basic_tbl_key },
/*032*/ { "근무자인적테이블"   , "WRKERTBL"    ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file), wrkr_personal_info_key },
/*033*/ { "휴일정보테이블"     , "HOLITBL"     ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),          holi_info_key },
/*034*/ { "발행사테이블"       , "ISSTBL"      ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),       iss_comp_tbl_key },
/*035*/ { "차량번호면제테이블" , "IMMCARNO"    ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),     imm_carno_info_key },
/*036*/ { "카드번호면제테이블" , "IMMCARD"     ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),       iss_comp_tbl_key },
/*037*/ { "사전등록마스터"     , "ADVMST"      ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),        bef_mst_tbl_key },
/*038*/ { "교통카드PL"         , "PLTPCARDMST" ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),         pl_mst_tbl_key },
/*039*/ { "BL마스터"           , "BLTCRDMST"   ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),         bl_mst_tbl_key },
/*040*/ { "차량번호감면테이블" , "REDCARNO"    ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),     red_carno_info_key },
/*041*/ { "사전등록변경분"     , "ADVCHG"      ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),        bef_chg_tbl_key },
/*042*/ { "PL변경분"           , "PLTCRDCHG"   ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),         pl_chg_tbl_key },
/*043*/ { "BL변경분"           , "BLTCRDCHG"   ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),         bl_chg_tbl_key },
/*044*/ { "차량번호면제C"      , "IMMCARNOC"   ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),     imm_carno_info_key },
/*045*/ { "RFID면제C"          , "IMMRFIDC"    ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),      imm_card_info_key },
/*046*/ { "차량번호감면C"      , "REDCARNOC"   ,          TF_NONE,  DF_DATA,      SIZE(tbl_dump_file),     red_carno_info_key },
/*047*/ { "IMSI교통카드BL"     , "IMSIBLMST"   ,          TF_NONE,  DF_BASE,             SIZE(bl_tbl),             bl_tbl_key },
/*048*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*049*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*050*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*073*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*052*/ { ""                   , ""            ,                0,       0,                         0,                   NULL },
/*073*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*073*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*073*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*056*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*073*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*058*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*059*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*060*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*061*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*062*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*063*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*064*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*065*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*066*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*067*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*068*/ { "원격차로상태조회"   , "RMTLANEST"   ,          TF_NONE,  DF_DATE,      SIZE(mchi_wrk_stat),      mchi_wrk_stat_key },
/*069*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*070*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*071*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*072*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*073*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*074*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*075*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
/*076*/ { ""                   , ""            ,                0,        0,                        0,                   NULL },
};

#endif
