def __init__(self, ext_params={}, is_transaction_owner=True, event_type=None): BaseService.__init__(self, ext_params, is_transaction_owner, event_type) self.expire_hours = 4
def generate_code(self, request: HttpRequest): base_service: BaseService = BaseService() params_config = [{ "table_name": RequestConfig(from_session=False, nullable=True, default="", datatype=DataTypes.STRING) }] params_object: ParamsObject = self.convert_params( request, HttpMethodType.get, params_config) if params_object.get_params_dict().get( "table_name") != "" and params_object.get_params_dict().get( "table_name") is not None: table_data: list = base_service.get_direct("sGetTableDetail", params_object, False) for table_detail in table_data: table_name = table_detail.get("TABLE_NAME") columns = table_detail.get("Columns") columns_type = table_detail.get("Columns_Type") is_nullable = table_detail.get("Is_Nullable") default_value = table_detail.get("Default_Value") self.generate_model(table_name, columns, columns_type, is_nullable, default_value) self.generate_api(table_name, columns, columns_type, is_nullable, default_value) self.generate_service(table_name, columns, columns_type, is_nullable, default_value) self.generate_repo(table_name, columns, columns_type, is_nullable, default_value) self.generate_url_mapping(table_name, columns, columns_type, is_nullable, default_value) self.generate_proc(table_name, columns, columns_type, is_nullable, default_value) # self.generate_api_list(table_name, columns, columns_type, is_nullable, default_value) return self.send_response("success")
def __init__(self, ext_params={}, is_transaction_owner=True): BaseService.__init__(self, ext_params, is_transaction_owner)