//---------------------------------------------------------------------------

#ifndef CDSUserFH
#define CDSUserFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <ADODB.hpp>
#include <DB.hpp>
#include "cxCustomData.hpp"
#include "ITSLibF.h"
//---------------------------------------------------------------------------

/*
*  User class
*/
class TItsUser
{
public:
    TItsUser();
    virtual ~TItsUser();
    void Clear();
private:
    bool    FCompleted;
    int     FEditMode;
	int     FGridIndex;

public:
    String  USER_ID;        //VARCHAR2(20)	N			사용자ID
    String  PWD;            //VARCHAR2(64)	Y			암호
    String  NAME;           //VARCHAR2(30)	Y			성명
    String  COMP;           //VARCHAR2(50)	Y			회사
    String  TEL;            //VARCHAR2(128)	Y			전화번호
    String  ADDR;           //VARCHAR2(200)	Y			주소
    String  RESD_NMBR;      //VARCHAR2(14)	Y			주민번호
    String  MOBILE;         //VARCHAR2(128)	Y			이동전화
    String  EMAL;           //VARCHAR2(128)	Y			이메일
    String  DEL_YN;         //CHAR(1)	Y	'N'		삭제 여부
    String  RGSTYMD;        //VARCHAR2(14)	Y			등록일자
    String  CRCTYMD;        //VARCHAR2(14)	Y			수정일자
    String  HINT_QUES;      //VARCHAR2(7)	Y			힌트질문
    String  HINT_ANS;       //VARCHAR2(100)	Y			힌트질문답
    String  GROP_ID;        //VARCHAR2(30)	Y			그룹ID
    String  OPER_SYST_ID;   //VARCHAR2(30)	Y			운영시스템ID

    String  GROP_NM;
    String  OPER_SYST_NM;

    String  MEM_DEL;
    
public:
    __property bool   Completed = {read = FCompleted, write = FCompleted};
	__property int    EditMode  = {read = FEditMode,  write = FEditMode };
	__property int    GridIndex = {read = FGridIndex, write = FGridIndex };
};
//---------------------------------------------------------------------------

/*
* User Manager
*/
class TItsUserManager
{
public:
    TItsUserManager();
    virtual ~TItsUserManager();

public:
    TItsMap<String, TItsUser*>   FLists;

public:
    bool LoadFromDb(TADOConnection *ADbConn=NULL);
};
//---------------------------------------------------------------------------
extern TItsUserManager *ItsUserManager;
//---------------------------------------------------------------------------

#endif

