import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { MerReport } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-12-11 17:07
 */
interface MerReportCU extends ConditionUtil<MerReportCU>{
    REPORT_ID:FieldUtil<MerReportCU>;
    LOT_ID:FieldUtil<MerReportCU>;
    MER_ID:FieldUtil<MerReportCU>;
    REPORT_DATE:FieldUtil<MerReportCU>;
    TOTAL_NUM:FieldUtil<MerReportCU>;
    TOTAL_COUNT:FieldUtil<MerReportCU>;
    TOTAL_MONEY:FieldUtil<MerReportCU>;
    TOTAL_TIME:FieldUtil<MerReportCU>;
    COUPON_ID:FieldUtil<MerReportCU>;
    ACTUAL_TOTAL_MONEY:FieldUtil<MerReportCU>;
}

class MerReportCUImpl extends ConditionUtilImpl<MerReportCUImpl> implements MerReportCU{ 
    newInstance(): MerReportCUImpl {
        return new MerReportCUImpl();
    } 
    get REPORT_ID(): FieldUtil<MerReportCU>{  
        return new FieldUtil('REPORT_ID','reportId','报表ID', this);
    }
    get LOT_ID(): FieldUtil<MerReportCU>{  
        return new FieldUtil('LOT_ID','lotId','车场ID', this);
    }
    get MER_ID(): FieldUtil<MerReportCU>{  
        return new FieldUtil('MER_ID','merId','商户ID', this);
    }
    get REPORT_DATE(): FieldUtil<MerReportCU>{  
        return new FieldUtil('REPORT_DATE','reportDate','汇总日期', this);
    }
    get TOTAL_NUM(): FieldUtil<MerReportCU>{  
        return new FieldUtil('TOTAL_NUM','totalNum','总笔数', this);
    }
    get TOTAL_COUNT(): FieldUtil<MerReportCU>{  
        return new FieldUtil('TOTAL_COUNT','totalCount','总张数', this);
    }
    get TOTAL_MONEY(): FieldUtil<MerReportCU>{  
        return new FieldUtil('TOTAL_MONEY','totalMoney','总金额', this);
    }
    get TOTAL_TIME(): FieldUtil<MerReportCU>{  
        return new FieldUtil('TOTAL_TIME','totalTime','总时长', this);
    }
    get COUPON_ID(): FieldUtil<MerReportCU>{  
        return new FieldUtil('COUPON_ID','couponId','抵扣卷ID', this);
    }
    get ACTUAL_TOTAL_MONEY(): FieldUtil<MerReportCU>{  
        return new FieldUtil('ACTUAL_TOTAL_MONEY','actualTotalMoney','实际抵扣总金额', this);
    }
}

@Singleton 
class MerReportMU extends TableUtilImpl<MerReportCU,MerReport>{ 
    tableName  = 'co_mer_report';
    tableFields  = ['REPORT_ID','LOT_ID','MER_ID','REPORT_DATE','TOTAL_NUM','TOTAL_COUNT','TOTAL_MONEY','TOTAL_TIME','COUPON_ID','ACTUAL_TOTAL_MONEY'];
    modelFields  = ['reportId','lotId','merId','reportDate','totalNum','totalCount','totalMoney','totalTime','couponId','actualTotalMoney'];
    modelIdFields  = ['reportId'];
    tableIdFields  = ['REPORT_ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): MerReportCU {
        return new MerReportCUImpl();
    }   

    static get REPORT_ID(): FieldUtil<MerReportCU>{ 
        return new FieldUtil('REPORT_ID','reportId','报表ID', new MerReportCUImpl());
    }
    static get LOT_ID(): FieldUtil<MerReportCU>{ 
        return new FieldUtil('LOT_ID','lotId','车场ID', new MerReportCUImpl());
    }
    static get MER_ID(): FieldUtil<MerReportCU>{ 
        return new FieldUtil('MER_ID','merId','商户ID', new MerReportCUImpl());
    }
    static get REPORT_DATE(): FieldUtil<MerReportCU>{ 
        return new FieldUtil('REPORT_DATE','reportDate','汇总日期', new MerReportCUImpl());
    }
    static get TOTAL_NUM(): FieldUtil<MerReportCU>{ 
        return new FieldUtil('TOTAL_NUM','totalNum','总笔数', new MerReportCUImpl());
    }
    static get TOTAL_COUNT(): FieldUtil<MerReportCU>{ 
        return new FieldUtil('TOTAL_COUNT','totalCount','总张数', new MerReportCUImpl());
    }
    static get TOTAL_MONEY(): FieldUtil<MerReportCU>{ 
        return new FieldUtil('TOTAL_MONEY','totalMoney','总金额', new MerReportCUImpl());
    }
    static get TOTAL_TIME(): FieldUtil<MerReportCU>{ 
        return new FieldUtil('TOTAL_TIME','totalTime','总时长', new MerReportCUImpl());
    }
    static get COUPON_ID(): FieldUtil<MerReportCU>{ 
        return new FieldUtil('COUPON_ID','couponId','抵扣卷ID', new MerReportCUImpl());
    }
    static get ACTUAL_TOTAL_MONEY(): FieldUtil<MerReportCU>{ 
        return new FieldUtil('ACTUAL_TOTAL_MONEY','actualTotalMoney','实际抵扣总金额', new MerReportCUImpl());
    }

    get REPORT_ID(): FieldUtil<MerReportCU>{ 
        return MerReportMU.REPORT_ID;
    }
    get LOT_ID(): FieldUtil<MerReportCU>{ 
        return MerReportMU.LOT_ID;
    }
    get MER_ID(): FieldUtil<MerReportCU>{ 
        return MerReportMU.MER_ID;
    }
    get REPORT_DATE(): FieldUtil<MerReportCU>{ 
        return MerReportMU.REPORT_DATE;
    }
    get TOTAL_NUM(): FieldUtil<MerReportCU>{ 
        return MerReportMU.TOTAL_NUM;
    }
    get TOTAL_COUNT(): FieldUtil<MerReportCU>{ 
        return MerReportMU.TOTAL_COUNT;
    }
    get TOTAL_MONEY(): FieldUtil<MerReportCU>{ 
        return MerReportMU.TOTAL_MONEY;
    }
    get TOTAL_TIME(): FieldUtil<MerReportCU>{ 
        return MerReportMU.TOTAL_TIME;
    }
    get COUPON_ID(): FieldUtil<MerReportCU>{ 
        return MerReportMU.COUPON_ID;
    }
    get ACTUAL_TOTAL_MONEY(): FieldUtil<MerReportCU>{ 
        return MerReportMU.ACTUAL_TOTAL_MONEY;
    }
}
export {MerReportMU, MerReportCU}
