class AppAuditLog implements Serializable {

    /**
     * 日志id
     */
    private Long id;

    /**
     * 应用id
     */
    private Long appId;
    
    /**
     * 审批id
     */
    private Long appAuditId;
    
    /**
     * 用户id
     */
    private Long userId;
    
    /**
     * 用户
     */
    private AppUser appUser;
    
    /**
     * 日志详情 是个json
     */
    private String info;
    
    /**
     * 创建时间
     */
    private Date createTime;
    
    /**
     * 日志类型
     */
    private Integer type;

    public Date getCreateTime() {
        return (Date) createTime.clone();
    }

    public void setCreateTime(Date createTime) {
        this.createTime = (Date) createTime.clone();
    }

    /**
     * 生成日志
     * @param appDesc
     * @param appUser
     * @param appAuditId
     * @param type
     * @return
     */
    public static AppAuditLog generate(AppDesc appDesc, AppUser appUser, Long appAuditId, AppAuditLogTypeEnum type){<FILL_FUNCTION_BODY>}

}

        if(appDesc == null || appUser == null || appAuditId == null){
            return null;
        }
        AppAuditLog log = new AppAuditLog();
        log.setAppId(appDesc.getAppId());
        log.setUserId(appUser.getId());
        log.setAppAuditId(appAuditId);
        log.setType(type.value());
        log.setCreateTime(new Date());
        log.setInfo(JSONObject.fromObject(appDesc).toString());
        return log;
    
<no_super_class>