using Fast.Web.Logic.GasControl;

namespace Fast.Models;
public class SosDataItem
{
    public SosDataItem(GasTrackExportItem gei)
    {
        //popuplate/convert all gei properties to this class properties
        bBOT_DEAL = gei.bBOT_DEAL;
        bVENDOR = gei.bVENDOR;
        bTYPE = gei.bTYPE;
        bPIPELINE = gei.bPIPELINE;
        bPOINT = gei.bPOINT;
        bCONTRACT = gei.bCONTRACT;
        bTRADER = gei.bTRADER;
        bTRADE_DATE = string.IsNullOrWhiteSpace(gei.bTRADE_DATE) ? null : DateOnly.ParseExact(gei.bTRADE_DATE, "yyyyMMdd");
        bSTART_DATE = string.IsNullOrWhiteSpace(gei.bSTART_DATE) ? null : DateOnly.ParseExact(gei.bSTART_DATE, "yyyyMMdd");
        bEND_DATE = string.IsNullOrWhiteSpace(gei.bEND_DATE) ? null : DateOnly.ParseExact(gei.bEND_DATE, "yyyyMMdd");
        bVOLUME = string.IsNullOrWhiteSpace(gei.bVOLUME) ? null : decimal.Parse(gei.bVOLUME);
        bINV_PRICE = string.IsNullOrWhiteSpace(gei.bINV_PRICE) ? null : decimal.Parse(gei.bINV_PRICE);
        bPRICE_TYPE = gei.bPRICE_TYPE;
        bPREMDISC = string.IsNullOrWhiteSpace(gei.bPREMDISC) ? null : decimal.Parse(gei.bPREMDISC);
        bPRICE = string.IsNullOrWhiteSpace(gei.bPRICE) ? null : decimal.Parse(gei.bPRICE);
        bINDEX = gei.bINDEX;
        bINT_ENTITY = gei.bINT_ENTITY;
        bTRANS_RATE = string.IsNullOrWhiteSpace(gei.bTRANS_RATE) ? null : decimal.Parse(gei.bTRANS_RATE);
        bFUEL_RATE = string.IsNullOrWhiteSpace(gei.bFUEL_RATE) ? null : decimal.Parse(gei.bFUEL_RATE); ;
        bOWNERSHIP = gei.bOWNERSHIP;
        TSF1 = gei.TSF1;
        TSF1_OUT_POINT = gei.TSF1_OUT_POINT;
        TSF1_IN_PIPE = gei.TSF1_IN_PIPE;
        TSF1_IN_POINT = gei.TSF1_IN_POINT;
        TSF1_IN_CONTRACT = gei.TSF1_IN_CONTRACT;
        TSF1_TRANS_RATE = string.IsNullOrWhiteSpace(gei.TSF1_TRANS_RATE) ? null : decimal.Parse(gei.TSF1_TRANS_RATE);
        TSF1_FUEL_RATE = string.IsNullOrWhiteSpace(gei.TSF1_FUEL_RATE) ? null : decimal.Parse(gei.TSF1_FUEL_RATE);
        TSF1_OWNERSHIP = gei.TSF1_OWNERSHIP;
        TSF2 = gei.TSF2;
        TSF2_OUT_POINT = gei.TSF2_OUT_POINT;
        TSF2_IN_PIPE = gei.TSF2_IN_PIPE;
        TSF2_IN_POINT = gei.TSF2_IN_POINT;
        TSF2_IN_CONTRACT = gei.TSF2_IN_CONTRACT;
        TSF2_TRANS_RATE = string.IsNullOrWhiteSpace(gei.TSF2_TRANS_RATE) ? null : decimal.Parse(gei.TSF2_TRANS_RATE);
        TSF2_FUEL_RATE = string.IsNullOrWhiteSpace(gei.TSF2_FUEL_RATE) ? null : decimal.Parse(gei.TSF2_FUEL_RATE);
        TSF2_OWNERSHIP = gei.TSF2_OWNERSHIP;
        TSF3 = gei.TSF3;
        TSF3_OUT_POINT = gei.TSF3_OUT_POINT;
        TSF3_IN_PIPE = gei.TSF3_IN_PIPE;
        TSF3_IN_POINT = gei.TSF3_IN_POINT;
        TSF3_IN_CONTRACT = gei.TSF3_IN_CONTRACT;
        TSF3_TRANS_RATE = string.IsNullOrWhiteSpace(gei.TSF3_TRANS_RATE) ? null : decimal.Parse(gei.TSF3_TRANS_RATE);
        TSF3_FUEL_RATE = string.IsNullOrWhiteSpace(gei.TSF3_FUEL_RATE) ? null : decimal.Parse(gei.TSF3_FUEL_RATE);
        TSF3_OWNERSHIP = gei.TSF3_OWNERSHIP;
        TSF4 = gei.TSF4;
        TSF4_OUT_POINT = gei.TSF4_OUT_POINT;
        TSF4_IN_PIPE = gei.TSF4_IN_PIPE;
        TSF4_IN_POINT = gei.TSF4_IN_POINT;
        TSF4_IN_CONTRACT = gei.TSF4_IN_CONTRACT;
        TSF4_TRANS_RATE = string.IsNullOrWhiteSpace(gei.TSF4_TRANS_RATE) ? null : decimal.Parse(gei.TSF4_TRANS_RATE);
        TSF4_FUEL_RATE = string.IsNullOrWhiteSpace(gei.TSF4_FUEL_RATE) ? null : decimal.Parse(gei.TSF4_FUEL_RATE);
        TSF4_OWNERSHIP = gei.TSF4_OWNERSHIP;
        TSF5 = gei.TSF5;
        TSF5_OUT_POINT = gei.TSF5_OUT_POINT;
        TSF5_IN_PIPE = gei.TSF5_IN_PIPE;
        TSF5_IN_POINT = gei.TSF5_IN_POINT;
        TSF5_IN_CONTRACT = gei.TSF5_IN_CONTRACT;
        TSF5_TRANS_RATE = string.IsNullOrWhiteSpace(gei.TSF5_TRANS_RATE) ? null : decimal.Parse(gei.TSF5_TRANS_RATE);
        TSF5_FUEL_RATE = string.IsNullOrWhiteSpace(gei.TSF5_FUEL_RATE) ? null : decimal.Parse(gei.TSF5_FUEL_RATE);
        TSF5_OWNERSHIP = gei.TSF5_OWNERSHIP;
        sSELL_DEAL = gei.sSELL_DEAL;
        sGASTRACK = gei.sGASTRACK;
        sCUSTOMER = gei.sCUSTOMER;
        sTYPE = gei.sTYPE;
        sPIPELINE = gei.sPIPELINE;
        sPOINT = gei.sPOINT;
        sCONTRACT = gei.sCONTRACT;
        sTRADER = gei.sTRADER;
        sTRADE_DATE = string.IsNullOrWhiteSpace(gei.sTRADE_DATE) ? null : DateOnly.ParseExact(gei.sTRADE_DATE, "yyyyMMdd");
        sSTART_DATE = string.IsNullOrWhiteSpace(gei.sSTART_DATE) ? null : DateOnly.ParseExact(gei.sSTART_DATE, "yyyyMMdd");
        sEND_DATE = string.IsNullOrWhiteSpace(gei.sEND_DATE) ? null : DateOnly.ParseExact(gei.sEND_DATE, "yyyyMMdd");
        sVOLUME = string.IsNullOrWhiteSpace(gei.sVOLUME) ? null : decimal.Parse(gei.sVOLUME);
        sINV_PRICE = string.IsNullOrWhiteSpace(gei.sINV_PRICE) ? null : decimal.Parse(gei.sINV_PRICE);
        sPRICE_TYPE = gei.sPRICE_TYPE;
        sPREMDISC = string.IsNullOrWhiteSpace(gei.sPREMDISC) ? null : decimal.Parse(gei.sPREMDISC);
        sPRICE = string.IsNullOrWhiteSpace(gei.sPRICE) ? null : decimal.Parse(gei.sPRICE);
        sINDEX = gei.sINDEX;
        sINT_ENTITY = gei.sINT_ENTITY;
    }

    public string? bBOT_DEAL { get; set; }
    public string? bVENDOR { get; set; }
    public string? bTYPE { get; set; }
    public string? bPIPELINE { get; set; }
    public string? bPOINT { get; set; }
    public string? bCONTRACT { get; set; }
    public string? bTRADER { get; set; }
    public DateOnly? bTRADE_DATE { get; set; }
    public DateOnly? bSTART_DATE { get; set; }
    public DateOnly? bEND_DATE { get; set; }
    public Decimal? bVOLUME { get; set; }
    public Decimal? bINV_PRICE { get; set; }
    public string? bPRICE_TYPE { get; set; }
    public Decimal? bPREMDISC { get; set; }
    public Decimal? bPRICE { get; set; }
    public string? bINDEX { get; set; }
    public string? bINT_ENTITY { get; set; }
    public Decimal? bTRANS_RATE { get; set; }
    public Decimal? bFUEL_RATE { get; set; }
    public string? bOWNERSHIP { get; set; }
    public string? TSF1 { get; set; }
    public string? TSF1_OUT_POINT { get; set; }
    public string? TSF1_IN_PIPE { get; set; }
    public string? TSF1_IN_POINT { get; set; }
    public string? TSF1_IN_CONTRACT { get; set; }
    public Decimal? TSF1_TRANS_RATE { get; set; }
    public Decimal? TSF1_FUEL_RATE { get; set; }
    public string? TSF1_OWNERSHIP { get; set; }
    public string? TSF2 { get; set; }
    public string? TSF2_OUT_POINT { get; set; }
    public string? TSF2_IN_PIPE { get; set; }
    public string? TSF2_IN_POINT { get; set; }
    public string? TSF2_IN_CONTRACT { get; set; }
    public Decimal? TSF2_TRANS_RATE { get; set; }
    public Decimal? TSF2_FUEL_RATE { get; set; }
    public string? TSF2_OWNERSHIP { get; set; }
    public string? TSF3 { get; set; }
    public string? TSF3_OUT_POINT { get; set; }
    public string? TSF3_IN_PIPE { get; set; }
    public string? TSF3_IN_POINT { get; set; }
    public string? TSF3_IN_CONTRACT { get; set; }
    public Decimal? TSF3_TRANS_RATE { get; set; }
    public Decimal? TSF3_FUEL_RATE { get; set; }
    public string? TSF3_OWNERSHIP { get; set; }
    public string? TSF4 { get; set; }
    public string? TSF4_OUT_POINT { get; set; }
    public string? TSF4_IN_PIPE { get; set; }
    public string? TSF4_IN_POINT { get; set; }
    public string? TSF4_IN_CONTRACT { get; set; }
    public Decimal? TSF4_TRANS_RATE { get; set; }
    public Decimal? TSF4_FUEL_RATE { get; set; }
    public string? TSF4_OWNERSHIP { get; set; }
    public string? TSF5 { get; set; }
    public string? TSF5_OUT_POINT { get; set; }
    public string? TSF5_IN_PIPE { get; set; }
    public string? TSF5_IN_POINT { get; set; }
    public string? TSF5_IN_CONTRACT { get; set; }
    public Decimal? TSF5_TRANS_RATE { get; set; }
    public Decimal? TSF5_FUEL_RATE { get; set; }
    public string? TSF5_OWNERSHIP { get; set; }
    public string? sSELL_DEAL { get; set; }
    public string? sGASTRACK { get; set; }
    public string? sCUSTOMER { get; set; }
    public string? sTYPE { get; set; }
    public string? sPIPELINE { get; set; }
    public string? sPOINT { get; set; }
    public string? sCONTRACT { get; set; }
    public string? sTRADER { get; set; }
    public DateOnly? sTRADE_DATE { get; set; }
    public DateOnly? sSTART_DATE { get; set; }
    public DateOnly? sEND_DATE { get; set; }
    public Decimal? sVOLUME { get; set; }
    public Decimal? sINV_PRICE { get; set; }
    public string? sPRICE_TYPE { get; set; }
    public Decimal? sPREMDISC { get; set; }
    public Decimal? sPRICE { get; set; }
    public string? sINDEX { get; set; }
    public string? sINT_ENTITY { get; set; }
}
