import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { CnOpsLog } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-11-04 10:56
 */
interface CnOpsLogCU extends ConditionUtil<CnOpsLogCU>{
    ID:FieldUtil<CnOpsLogCU>;
    ENTITY_ID:FieldUtil<CnOpsLogCU>;
    OPS_BEFORE:FieldUtil<CnOpsLogCU>;
    OPS_AFTER:FieldUtil<CnOpsLogCU>;
    DELETED:FieldUtil<CnOpsLogCU>;
    CREATE_USER_ID:FieldUtil<CnOpsLogCU>;
    CREATE_TIME:FieldUtil<CnOpsLogCU>;
    UPDATE_USER_ID:FieldUtil<CnOpsLogCU>;
    UPDATE_TIME:FieldUtil<CnOpsLogCU>;
}

class CnOpsLogCUImpl extends ConditionUtilImpl<CnOpsLogCUImpl> implements CnOpsLogCU{ 
    newInstance(): CnOpsLogCUImpl {
        return new CnOpsLogCUImpl();
    } 
    get ID(): FieldUtil<CnOpsLogCU>{  
        return new FieldUtil('id','id','主键', this);
    }
    get ENTITY_ID(): FieldUtil<CnOpsLogCU>{  
        return new FieldUtil('entity_id','entityId','记录实体ID', this);
    }
    get OPS_BEFORE(): FieldUtil<CnOpsLogCU>{  
        return new FieldUtil('ops_before','opsBefore','操作前记录', this);
    }
    get OPS_AFTER(): FieldUtil<CnOpsLogCU>{  
        return new FieldUtil('ops_after','opsAfter','操作后记录', this);
    }
    get DELETED(): FieldUtil<CnOpsLogCU>{  
        return new FieldUtil('deleted','deleted','删除标记', this);
    }
    get CREATE_USER_ID(): FieldUtil<CnOpsLogCU>{  
        return new FieldUtil('create_user_id','createUserId','创建人', this);
    }
    get CREATE_TIME(): FieldUtil<CnOpsLogCU>{  
        return new FieldUtil('create_time','createTime','创建时间', this);
    }
    get UPDATE_USER_ID(): FieldUtil<CnOpsLogCU>{  
        return new FieldUtil('update_user_id','updateUserId','更新人', this);
    }
    get UPDATE_TIME(): FieldUtil<CnOpsLogCU>{  
        return new FieldUtil('update_time','updateTime','更新时间', this);
    }
}

@Singleton 
class CnOpsLogMU extends TableUtilImpl<CnOpsLogCU,CnOpsLog>{ 
    tableName  = 'cn_ops_log';
    tableFields  = ['id','entity_id','ops_before','ops_after','deleted','create_user_id','create_time','update_user_id','update_time'];
    modelFields  = ['id','entityId','opsBefore','opsAfter','deleted','createUserId','createTime','updateUserId','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): CnOpsLogCU {
        return new CnOpsLogCUImpl();
    }   

    static get ID(): FieldUtil<CnOpsLogCU>{ 
        return new FieldUtil('id','id','主键', new CnOpsLogCUImpl());
    }
    static get ENTITY_ID(): FieldUtil<CnOpsLogCU>{ 
        return new FieldUtil('entity_id','entityId','记录实体ID', new CnOpsLogCUImpl());
    }
    static get OPS_BEFORE(): FieldUtil<CnOpsLogCU>{ 
        return new FieldUtil('ops_before','opsBefore','操作前记录', new CnOpsLogCUImpl());
    }
    static get OPS_AFTER(): FieldUtil<CnOpsLogCU>{ 
        return new FieldUtil('ops_after','opsAfter','操作后记录', new CnOpsLogCUImpl());
    }
    static get DELETED(): FieldUtil<CnOpsLogCU>{ 
        return new FieldUtil('deleted','deleted','删除标记', new CnOpsLogCUImpl());
    }
    static get CREATE_USER_ID(): FieldUtil<CnOpsLogCU>{ 
        return new FieldUtil('create_user_id','createUserId','创建人', new CnOpsLogCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<CnOpsLogCU>{ 
        return new FieldUtil('create_time','createTime','创建时间', new CnOpsLogCUImpl());
    }
    static get UPDATE_USER_ID(): FieldUtil<CnOpsLogCU>{ 
        return new FieldUtil('update_user_id','updateUserId','更新人', new CnOpsLogCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<CnOpsLogCU>{ 
        return new FieldUtil('update_time','updateTime','更新时间', new CnOpsLogCUImpl());
    }

    get ID(): FieldUtil<CnOpsLogCU>{ 
        return CnOpsLogMU.ID;
    }
    get ENTITY_ID(): FieldUtil<CnOpsLogCU>{ 
        return CnOpsLogMU.ENTITY_ID;
    }
    get OPS_BEFORE(): FieldUtil<CnOpsLogCU>{ 
        return CnOpsLogMU.OPS_BEFORE;
    }
    get OPS_AFTER(): FieldUtil<CnOpsLogCU>{ 
        return CnOpsLogMU.OPS_AFTER;
    }
    get DELETED(): FieldUtil<CnOpsLogCU>{ 
        return CnOpsLogMU.DELETED;
    }
    get CREATE_USER_ID(): FieldUtil<CnOpsLogCU>{ 
        return CnOpsLogMU.CREATE_USER_ID;
    }
    get CREATE_TIME(): FieldUtil<CnOpsLogCU>{ 
        return CnOpsLogMU.CREATE_TIME;
    }
    get UPDATE_USER_ID(): FieldUtil<CnOpsLogCU>{ 
        return CnOpsLogMU.UPDATE_USER_ID;
    }
    get UPDATE_TIME(): FieldUtil<CnOpsLogCU>{ 
        return CnOpsLogMU.UPDATE_TIME;
    }
}
export {CnOpsLogMU, CnOpsLogCU}
