import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { ContentDetailed } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-11-06 11:37
 */
interface ContentDetailedCU extends ConditionUtil<ContentDetailedCU>{
    ID:FieldUtil<ContentDetailedCU>;
    CONTENT_ID:FieldUtil<ContentDetailedCU>;
    SEND_RECORD_ID:FieldUtil<ContentDetailedCU>;
    ANSWER_CONTENT:FieldUtil<ContentDetailedCU>;
    BROWSED:FieldUtil<ContentDetailedCU>;
    ANSWERED:FieldUtil<ContentDetailedCU>;
    EFF_DATE:FieldUtil<ContentDetailedCU>;
    EXP_DATE:FieldUtil<ContentDetailedCU>;
    STATUS:FieldUtil<ContentDetailedCU>;
    SUBMIT_USER_ID:FieldUtil<ContentDetailedCU>;
    CREATE_TIME:FieldUtil<ContentDetailedCU>;
    UPDATE_TIME:FieldUtil<ContentDetailedCU>;
}

class ContentDetailedCUImpl extends ConditionUtilImpl<ContentDetailedCUImpl> implements ContentDetailedCU{ 
    newInstance(): ContentDetailedCUImpl {
        return new ContentDetailedCUImpl();
    } 
    get ID(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('ID','id','', this);
    }
    get CONTENT_ID(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('CONTENT_ID','contentId','问卷内容id', this);
    }
    get SEND_RECORD_ID(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('SEND_RECORD_ID','sendRecordId','发送记录', this);
    }
    get ANSWER_CONTENT(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('ANSWER_CONTENT','answerContent','问卷内容答案', this);
    }
    get BROWSED(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('BROWSED','browsed','是否浏览过  0 否 1 是', this);
    }
    get ANSWERED(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('ANSWERED','answered','是否答题过 0否 1 是', this);
    }
    get EFF_DATE(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('EFF_DATE','effDate','有效时间', this);
    }
    get EXP_DATE(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('EXP_DATE','expDate','失效日期', this);
    }
    get STATUS(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('STATUS','status','状态 1 正常 2 禁用 3.删除', this);
    }
    get SUBMIT_USER_ID(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('SUBMIT_USER_ID','submitUserId','答卷人', this);
    }
    get CREATE_TIME(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('CREATE_TIME','createTime','', this);
    }
    get UPDATE_TIME(): FieldUtil<ContentDetailedCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','', this);
    }
}

@Singleton 
class ContentDetailedMU extends TableUtilImpl<ContentDetailedCU,ContentDetailed>{ 
    tableName  = 'cq_content_detailed';
    tableFields  = ['id','content_id','send_record_id','answer_content','browsed','answered','eff_date','exp_date','status','submit_user_id','create_time','update_time'];
    modelFields  = ['id','contentId','sendRecordId','answerContent','browsed','answered','effDate','expDate','status','submitUserId','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): ContentDetailedCU {
        return new ContentDetailedCUImpl();
    }   

    static get ID(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('ID','id','', new ContentDetailedCUImpl());
    }
    static get CONTENT_ID(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('CONTENT_ID','contentId','问卷内容id', new ContentDetailedCUImpl());
    }
    static get SEND_RECORD_ID(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('SEND_RECORD_ID','sendRecordId','发送记录', new ContentDetailedCUImpl());
    }
    static get ANSWER_CONTENT(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('ANSWER_CONTENT','answerContent','问卷内容答案', new ContentDetailedCUImpl());
    }
    static get BROWSED(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('BROWSED','browsed','是否浏览过  0 否 1 是', new ContentDetailedCUImpl());
    }
    static get ANSWERED(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('ANSWERED','answered','是否答题过 0否 1 是', new ContentDetailedCUImpl());
    }
    static get EFF_DATE(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('EFF_DATE','effDate','有效时间', new ContentDetailedCUImpl());
    }
    static get EXP_DATE(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('EXP_DATE','expDate','失效日期', new ContentDetailedCUImpl());
    }
    static get STATUS(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('STATUS','status','状态 1 正常 2 禁用 3.删除', new ContentDetailedCUImpl());
    }
    static get SUBMIT_USER_ID(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('SUBMIT_USER_ID','submitUserId','答卷人', new ContentDetailedCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','', new ContentDetailedCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<ContentDetailedCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','', new ContentDetailedCUImpl());
    }

    get ID(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.ID;
    }
    get CONTENT_ID(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.CONTENT_ID;
    }
    get SEND_RECORD_ID(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.SEND_RECORD_ID;
    }
    get ANSWER_CONTENT(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.ANSWER_CONTENT;
    }
    get BROWSED(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.BROWSED;
    }
    get ANSWERED(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.ANSWERED;
    }
    get EFF_DATE(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.EFF_DATE;
    }
    get EXP_DATE(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.EXP_DATE;
    }
    get STATUS(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.STATUS;
    }
    get SUBMIT_USER_ID(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.SUBMIT_USER_ID;
    }
    get CREATE_TIME(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<ContentDetailedCU>{ 
        return ContentDetailedMU.UPDATE_TIME;
    }
}
export {ContentDetailedMU, ContentDetailedCU}
